fsocketopen not responding

Hi - thanks for this forum!
I am using fsocketopen to check if my server is up and if not run another remote program to reboot it.

but the fsocketopen is not responding. after hours of port forwarding and adjusting the firewall (win7) it still would not pick up the port, so, for testing purposes, i checked it against port 80 and that worked fine.

then i found the following site:
http://canyouseeme.org/

and checked all my ports in question against this site. works fine.

so that leads me back to fsocketopen()
[php]
$fp = @fsockopen($serverip, $serverport, $errno, $errstr, 3);
if (!$fp) {
$t = “Off”;
$bgimage = “server_offline.png”;
}else{
$t = “On”;
$bgimage=“server_online.png”;
}
@fclose($fp);
[/php]

I don’t see an error here, however I do not work much with fsocket. is there another php method that can be used to check against the port?

oh,
forgot the error that fsocket is giving is a timeout error

Sponsor our Newsletter | Privacy Policy | Terms of Service