Jake:)
10-21-2009, 04:31 PM
Hello,
At the moment, I have pulled together a simple PHP Script which tells the person viewing the page HOW LONG the page takes to load etc, I have gone brain dead now :(
<?php
$ip = "youriphere";
$port = "yourporthere";
$start = microtime(true);
if (!$sock = @fsockopen($ip, $port, $num, $error, 5))
echo '<B><FONT COLOR=red>Offline</b></FONT>';
else{
$howlong = microtime(true) - $start;
echo '<B><FONT COLOR=lime>Online</b></FONT> time: ' . $howlong . ' seconds';
fclose($sock);
}
?>I want it to look like this page http://www.spamsite.co.uk/status.php
So, after x seconds the page would state it as SLOW
after y seconds the page would state it as DOWN
after z seconds the page would state it as ACTIVE
Help is appreciated :)
At the moment, I have pulled together a simple PHP Script which tells the person viewing the page HOW LONG the page takes to load etc, I have gone brain dead now :(
<?php
$ip = "youriphere";
$port = "yourporthere";
$start = microtime(true);
if (!$sock = @fsockopen($ip, $port, $num, $error, 5))
echo '<B><FONT COLOR=red>Offline</b></FONT>';
else{
$howlong = microtime(true) - $start;
echo '<B><FONT COLOR=lime>Online</b></FONT> time: ' . $howlong . ' seconds';
fclose($sock);
}
?>I want it to look like this page http://www.spamsite.co.uk/status.php
So, after x seconds the page would state it as SLOW
after y seconds the page would state it as DOWN
after z seconds the page would state it as ACTIVE
Help is appreciated :)