im using content on one of my sites that pulls from an external server.
sometimes that external server's httpd service isn't working that great.
is there a way to test for a page before trying to read it? i can do a file_exists, but the problem is that i don't want to make them wait until it times out. i want it to print an error after about 5 seconds of the external server not responding.
it would be cool if php had some built-in timer functions where you could keep looping to check if a file has been detected until the specified time of the end of the loop.
something like this:
Code:
while($start_time < $end_time)
{
check for file; // but keep looping while still checking the file
if(file is found)
{
$end_time==$start_time;
}
}