Jump to content


Check status of a web page

  • Please log in to reply
1 reply to this topic

#1 Atomg

  • New Members
  • Pip
  • Newbie
  • 9 posts

Posted 25 May 2006 - 11:56 PM

Hi all,

I would like to make a php page. In that page, the php code would check if, let's say, 5 web pages are up or down. For example, sometimes when I access a web page and the host server of this webpage is not working (perhaps it is rebooting, or a bug, etc.), I have a error message.

I have the php documentation but I don't know what to search in it for this kind of thing. If anyone could help me with that, or only give me some functions I could look up in the php manual, or an existing tutorial, etc. I would be very happy to.

Thank you for your help.

(edit) Could be a Javascript also (.js) But would like more a php if available.


IS OK - google.com
NOT OK - ebay.ca
IS OK - yahoo.ca
IS OK - microsoft.ca
NOT OK - thottbot.com

#2 trq

  • Staff Alumni
  • Advanced Member
  • 31,041 posts

Posted 26 May 2006 - 12:06 AM

Just try and open the file (url) via [a href=\"http://php.net/fopen\" target=\"_blank\"]fopen[/a](), if it succeeds the site is up, otherwise the site is down.

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users