By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,856 Members | 2,004 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,856 IT Pros & Developers. It's quick & easy.

Checking if a site is available

P: n/a
What PHP code would I use to check if submitted sites to my directory
actually exist?? I want to use something that can return the server
code to me, ie HTTP 300 OK, or whatever. Can I do this with sockets??
Jul 16 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
John,

Probably the curl library would be a LOT easier to work with. There's
probably an example of what you are talking about in the documentation
at php.net. Even shelling out to the curl binary would be easier than
re-writing the http protocol to see if sites are up.

Jason

John Ryan wrote:
What PHP code would I use to check if submitted sites to my directory
actually exist?? I want to use something that can return the server
code to me, ie HTTP 300 OK, or whatever. Can I do this with sockets??


Jul 16 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.