1. We have moved from vBulletin to XenForo and you are viewing the site in the middle of the move. Though the functional aspect of everything is working fine, we are still working on other changes including the new design on Xenforo.
    Dismiss Notice

Query remote website for activity

Discussion in 'PHP' started by verenion, Jan 10, 2009.

  1. verenion

    verenion New Member

    Joined:
    Dec 9, 2008
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    0
    Hello, i am new here so any help would be appriciated!

    I am basically looking for a function to do this:


    PHP:
    $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
     
  2. shabbir

    shabbir Administrator Staff Member

    Joined:
    Jul 12, 2004
    Messages:
    15,276
    Likes Received:
    364
    Trophy Points:
    83
    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.
     
  3. verenion

    verenion New Member

    Joined:
    Dec 9, 2008
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    0
    I Assume you mean the PEAR package? i didnt realy think of using ping, cheers ill have a look at that :)
     

Share This Page