-2

I'm trying to replicate sites like http://www.downforeveryoneorjustme.com or http://doj.me. Any ideas about the coding?

Edit: could I also have some source code examples?

2 Answers2

2

You could use get_headers() and check to see if returned anything but 200 OK.

You could also try a HEAD request, but there is a small chance a server may respond differently than a GET.

alex
  • 460,746
  • 196
  • 858
  • 974
  • I'm not sure that checking for HTTP 200 is part of the test: it may return a 404, but that still indicates the web server is alive.. What about just checking port 80? – redShadow Dec 19 '11 at 23:39
2

You could try curl to see what response headers you get back from the specified url. Then go from there I guess.

Simon H
  • 1,735
  • 12
  • 14