I am looking to build a script that will check to make sure my machine is online from an outside source.
Basically here is what is up.
I have a crappy ass DSL Modem that loses it's connection sometimes (like twice a day).
What I need to do is build a script that will run (sans browser) check for a connection, I figure by pinging something like... yahoo.com or google.com and if the ping comes up either none, or slow then it opens a page on my router that resets the router.
The router page is internal on my network so I think I can just open it etc.
I really need help on the other part. Is there a function similar to ping for PHP?