cursed
12-17-2006, 05:00 AM
I want a simple php script to show if a website is offline or online.. however, i dont want it to show
Warning: file_get_contents( http://www.svyt.com/proxy.html) [function.file-get-contents]: failed to open stream: No such file or directory in /home/user/public_html/proxy/status.php on line 6
I just want it to show:
Offline
heres my code:
<?php if(strpos(file_get_contents(' http://www.svyt.com/proxy.html'), 'advanced') !== false)
echo('<font color="green">Online</font>');
else
echo('<font color="red">Offline</font>'); ?>
Note: svyt.com/proxy.html should contain the text advanced - no need to change any part of that.
Warning: file_get_contents( http://www.svyt.com/proxy.html) [function.file-get-contents]: failed to open stream: No such file or directory in /home/user/public_html/proxy/status.php on line 6
I just want it to show:
Offline
heres my code:
<?php if(strpos(file_get_contents(' http://www.svyt.com/proxy.html'), 'advanced') !== false)
echo('<font color="green">Online</font>');
else
echo('<font color="red">Offline</font>'); ?>
Note: svyt.com/proxy.html should contain the text advanced - no need to change any part of that.