Posts: 774
Name: Will Craig
Location: Cheltenham, Gloucestershire, UK
|
I have an apache server set up on my computer.
To save bw, if this computer is on, images etc are to be called from this computer.
I know how to do this, but not how to check if computer is on.
I have made file server.ison and have found the following that works...
PHP Code:
<?php
$off = "No";
fopen("http://86.128.132.191/server.ison", "r") or die($off = "Yes");
echo $off;
?>
But, if i stop acache (simulating the computer being off) the error message
Warning: fopen( http://86.128.132.191/server.ison): failed to open stream: HTTP request failed! HTTP/1.1 200 OK in /home/thebulls/public_html/server.php on line 3 appears.
Basicly, what I am asking is: How do I stop error message appearing?
Last edited by mad_willsy : 05-04-2006 at 01:39 PM.
Reason: Title too long
|