WHOIS query using PHP

Discussion in 'PHP' started by pradeep, Aug 2, 2006.

  1. pradeep

    pradeep Team Leader

    Joined:
    Apr 4, 2005
    Messages:
    1,645
    Likes Received:
    87
    Trophy Points:
    0
    Occupation:
    Programmer
    Location:
    Kolkata, India
    Home Page:
    http://blog.pradeep.net.in
    Do a WHOIS query for any domain using the script below.:)
    PHP:
    <form method="POST" action= "<?$_SERVER['PHP_SELF']?>">
        <label>Do a WHOIS query:</label>
        <P> 
            <INPUT name="domain" SIZE="20" MAXLENGTH="22">
            <INPUT TYPE="SUBMIT" VALUE="Check name">
            <INPUT TYPE="RESET" VALUE="Clear">
        </P>
    </FORM>
    <hr>
    <font size="2">
    <?php

    function whois($domain$server="www.go4expert.com")

        
    $fp fsockopen ($server43, &$errnr, &$errstr) or die("$errno$errstr");
        
    fputs($fp"$domain\n");
        while (!
    feof($fp))
            echo 
    "<pre>".fgets($fp2048)."";
        
    fclose($fp); 

    If (isset (
    $domain))
    {
        
    whois($domain);
    }
    ?>
    </font>
     
  2. pipeten

    pipeten New Member

    Joined:
    Oct 14, 2006
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    0
    I wouldn't recommend using this script without register_globals set off.
     
  3. pipeten

    pipeten New Member

    Joined:
    Oct 14, 2006
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    0
    Still a nice script though (no offence meant)
     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice