Only thing I can suggest is try a tracert to your web server to see if there's any obvious lag within the network. If its working ok from outside the network that limits the problem to somewhere within your network or internet connection.
Firewalls shouldn't be limiting the bandwidth or delaying things, but its always a possibility - could be worth temporarily disabling all internet security (in a controlled manner, with the support of your IT dept

) to see whether theres a problem there. Norton Internet Security for example is well known to cause these types of problems, but generally for all websites not just a select few.
Is the web server in question inside or outside of your network? If its inside your network that rules out your internet connection so the problem must lie elsewhere. If its outside your network, do you have any similar problems with other servers inside your network? If not then the problem is likely to be your internet connection.
Tracert will hopefully give you some answers as to where the delay is occuring. If the site works fine from outside but not inside its unlikely to be a problem with your PHP code or your web server (although it could be, its just more unlikely)
Let us know the results of your tracert
hth
edit: you say from outside your network it takes 2-3 seconds to load, that's quite a long time for a webpage. out of interest, do you happen to use IE6 within your network? IE6 has well documented rendering issues and can often freeze for a few seconds when rendering complex pages with lots of nested elements.