You Are Here: Home »   Code Tuesday January 6th 2009

Code Library - php

Quick Site Check - (1246 views)


<?

//replace the site with an IP if you wish, or change the port to check different services

$site "netcode.net";
$check fsockopen($site80);

if (
$check) {
    echo 
"$site is up";
}
else {
    echo 
"$site is down";
}

?>