Go4Expert

Go4Expert (http://www.go4expert.com/)
-   PHP (http://www.go4expert.com/forums/php/)
-   -   Query remote website for activity (http://www.go4expert.com/forums/query-remote-website-activity-t15783/)

verenion 10Jan2009 07:35

Query remote website for activity
 
Hello, i am new here so any help would be appriciated!

I am basically looking for a function to do this:


PHP Code:

$result QueryWebsite($WebsiteURL);
  if (
$result) { return true; } else {return false;} 

The function would query the website, if a reply is recieved, then the website is active, if not it is inactive and i can use email alerts to email me.. etc..

I am a web developer and this is going to be part of a web design manager so i can see if any sites i maintain have been inactive.

Thanks in advance

shabbir 10Jan2009 10:10

Re: Query remote website for activity
 
Try to use the system command like ping / nslookup and if you get a valid ip for the host name means it has a live website.

verenion 10Jan2009 21:12

Re: Query remote website for activity
 
Quote:

Originally Posted by shabbir (Post 41298)
Try to use the system command like ping / nslookup and if you get a valid ip for the host name means it has a live website.

I Assume you mean the PEAR package? i didnt realy think of using ping, cheers ill have a look at that :)


All times are GMT +5.5. The time now is 23:07.