Online'; $offline='Offline'; //Functions function servercheck($server,$port){ //Check that the port value is not empty if(empty($port)){ $port=80; } //Check that the server value is not empty if(empty($server)){ $server='members.ziggo.nl'; } //Connection $fp=@fsockopen($server, $port, $errno, $errstr, 1); //Check if connection is present if($fp){ //Return Alive return 1; } else{ //Return Dead return 0; } //Close Connection fclose($fp); } //Ports and Services to check $services=array( 'Outernet FTP directory' => array('members.ziggo.nl' => 80), 'Outernet receiver guest-webaccess' => array('nas.martinandela.nl' => 55555), ); ?>

$server){ ?> $port){ if(servercheck($host,$port)){ echo $online; }else{ echo $offline; } } ?>
Loading...