Jamesking56 Posted June 3, 2009 Share Posted June 3, 2009 How can I use PHP to check if a site is working? Link to comment Share on other sites More sharing options...
justsomeguy Posted June 3, 2009 Share Posted June 3, 2009 Use fsockopen to open a connection to the server. If you just want to check if the server is accepting connections, all you need to check for is that the connection didn't time out. If the connection timed out then it couldn't find the server. That doesn't necessarily mean the server is offline, it just means the system with PHP on it could not reach the system you're testing. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.