Hi there,
I've been trying to write a function to check whether a server is up or not, and redirect the user to another randomly chosen server if it isn't.
I'm checking the server's activity with fsockopen, but there is a problem: although I pass a timeout argument in fsocketopen(), it ignores it and the script times out after the default 30 seconds.
I'm using PHP 4.03pl1 with IIS 4 on NT. My function call looks like this:
$fp = fsockopen ($hostname, 80, $errno, $errstr, $timeout);
any ideas?
Thanks