Posted by Aetherweb on 01/29/07 11:19
On my site I'm reading content from a URL with a statement like this:
if ($fp = @fopen("http://www.mydom.com/test.aspx", "r"))
{
do something
}
else
{
do something else
}
Which works absolutely fine if the remote site works, and fine if it's
totally unavailable... but sometimes the remote site allows the
connection, but takes EONS to server up any data. Which is totally
locking up my site.
How could I go about having some kind of timeout on the file open
operation?
TIA
Navigation:
[Reply to this message]
|