I have a mirror page where I want to be able to display the status of my servers. I decided to do this buy attempting to open a connection to port 80 (Apache) and port 3306 (MySQL). If either/both of these connections fail then I can report the server as being offline.
It works perfectly when the server is running fine. Shutting down Apache and MySQL give the expected results. However when the computer is turned off or disconnected off the local network the mirror page won't even load, even though there's a 10 second time limit to each port connection (the using fsockopen function).
I think this may be because the server's net access is routed through a DSL modem and the packet(s) might get lost in the internal network (I wish to access it from the internet).
Any help/advice/alternate methods would be greatly appreciated!!!
Thanks!