How can I verify if a domain is online?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Adrian4net
    New Member
    • Jan 2010
    • 4

    How can I verify if a domain is online?

    How can I verify if a domain is online , for any language html xml xhtml etc.
  • Atli
    Recognized Expert Expert
    • Nov 2006
    • 5062

    #2
    ... By sending a request to said domain. When they are online, they tend to respond to requests; whereas if they are not, they tend not to.

    Comment

    • nilayanand
      New Member
      • Nov 2006
      • 10

      #3
      Code:
      $fp = fsockopen("www.example.com", 80, $errno, $errstr, 30);
      if ($fp) 
          echo "Domain Online";
      else 
         echo "Not";
      
      fclose($fp);
      Last edited by Atli; Jan 27 '10, 10:12 AM. Reason: Added [code] tags.

      Comment

      Working...