You may have to try lower level socket calls to get better control of the timeouts. This involves opening a socket up, sending an HTTP GET request, reading the response page, then closing the socket.
Here is one example I found, but I think I've seen some others:
<?php
$fp = fsockopen("http://www.php.net", 80);
if(!$fp) {
echo "Unable to open\n";
} else {
fputs($fp,"GET / HTTP/1.0\n\n");
$start = time();
socket_set_timeout($fp, 2);
$res = fread($fp, 2000);
var_dump(socket_get_status($fp));
fclose($fp);
print $res;
}
?>
Dave
===========================================
http://badblue.com
Small footprint P2P web server for Windows,
File-sharing, PHP, wireless apps & more