Jump to content


This topic is now archived and is closed to further replies.


Check status of a web page

Recommended Posts

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

Share this post

Link to post
Share on other sites
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.

Share this post

Link to post
Share on other sites


Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.