Hello folks,
Is there a way to know if my website(local) is connected to internet or is not?
I can only think about trying some fopen() script, or something similar to detect if the website (local) is online.
Regards,
Pepe
I made a function for you. Put online.txt on your website and put something in it so it's not 0 bytes.
<? function online_status() { $string = "My webserver is "; $fp = fopen("http://url.com/online.txt","r"); if($fp) { echo "$string ONLINE"; } else { echo "$string OFFLINE"; }
USAGE: <? online_status(); ?>
Thank you gaugi,
I owe you a beer...
Pepe Peinado