use file_get_contents to get a file listing from it.. run apache on the remote machine.
If you get the page, its working fine. If you can't then you're not online
I do something similar (but with a lot more complicated rule set+code) to handle my ISP's internet rules.