<?php function ping($host, $port, $timeout) { $tB = microtime(true); $fP = fSockOpen($host, $port, $errno, $errstr, $timeout); if (!$fP) { return '<strong style="color: red;">failed</strong>'; } $tA = microtime(true); return '<strong style="color:green;">success in '.round((($tA - $tB) * 1000), 0).' milliseconds</strong>'; } ?> <p>Pinging 178.79.137.101... <? echo @ping("178.79.137.101", 80, 10); ?>.</p> <p>Pinging www.tehforum.co.uk... <? echo @ping("www.tehforum.co.uk", 80, 10); ?>.</p> <p>Verifying forum is online...<? if (strpos(strtolower(file_get_contents("http://www.tehforum.co.uk/forum")),'<title>teh forum</title>') !== false) { echo '<strong style="color:green;">success</strong>'; } else { echo '<strong style="color:red;">failed</strong>'; } ?>.</p>
Well I did quote the one I've used in the first post....
And thanks for Teh Backup code, I shall give that a go :D