<? $check = fsockopen("www.tupagina.com", 80, $errno, $errstr, 40); if($check){ echo "Online"; } else { echo "offline"; } ?>