Newbie- Server Check

Code:
<html>
<head>
  <title></title>
</head>

<body>

<?php

$server = "hostlive.co.uk";
$port = 80;

$fp = fsockopen ($server, $port);

if(!$fp) 
{
$msg = "your message here";
mail("your email here", "subject here", $msg);
} //end if

?>

</body>
</html>

very simple script, it attempts to connect to port 80 of "hostlive.co.uk" on port 80, if its unsuccesful, it emails you.
Sorry, but i dont know how you can get the time it takes to connect, but im sure its possible.
 
Back
Top