-1

Possible Duplicate:
curl and ping - how to check whether a website is either up or down?
Code for seeing if a website is down?
Source code for downforeveryoneorjustme.com

How could I make a form in php, that would allow a user to submit a URL, and then find out whether the site they are trying is down or not?

I think this would use cURL but I'm not sure.

Could you provide the source code of how you would do this?

Community
  • 1
  • 1

1 Answers1

0

You could use curl then read response code / headers to see if they are correct. Sample codes are in manual: http://pl.php.net/manual/en/function.curl-getinfo.php

piotrekkr
  • 2,785
  • 2
  • 21
  • 35