Posted by Toby Inkster on 10/02/05 11:35
Max wrote:
> Website A: UP
>
> I'd like the UP to be an iframe without a border so that it appears as
> though it's all the same page. The iframe has some PHP code that pings the
> site, and then prints UP or Down.
Seems a bit OTT. Why do you need an iframe at all? What's wrong with
putting this in the main page itself:
<?php
$host = 'websitea.example.org';
$ping = `ping -c1 -q '$host'`;
print "<strong>Website A:</strong> ";
print (strstr($ping, '1 packets transmitted, 1 received'))
? '<var style="color:#090;background:#cfc">UP</var>'
: '<var style="color:#900;background:#fcc">DOWN</var>';
?>
--
Toby A Inkster BSc (Hons) ARCS
Contact Me ~ http://tobyinkster.co.uk/contact
[Back to original message]
|