I want to check if a site is online, using the next lines of code:
$fp=fsockopen("www.phpbuilder.com", 80, &$errno, &$errdesc);
if($fp) {
print"ONLINE" }
else {
print"OFFLINE" }
The error i get is: "Connection timed out" BUT when i use "localhost" instead of "www.phpbuilder.com" everthing works fine!!??
Can anyone help me?
Thanks,
Mark