Go4Expert (http://www.go4expert.com/)
-   PHP (http://www.go4expert.com/articles/php-tutorials/)
-   -   WHOIS query using PHP (http://www.go4expert.com/articles/whois-query-using-php-t1112/)

pradeep 2Aug2006 18:57

WHOIS query using PHP
Do a WHOIS query for any domain using the script below.:)
Code: PHP

<form method="POST" action= "<?$_SERVER['PHP_SELF']?>">
    <label>Do a WHOIS query:</label>
        <INPUT name="domain" SIZE="20" MAXLENGTH="22">
        <INPUT TYPE="SUBMIT" VALUE="Check name">
        <INPUT TYPE="RESET" VALUE="Clear">
<font size="2">

function whois($domain, $server="www.go4expert.com")
    $fp = fsockopen ($server, 43, &$errnr, &$errstr) or die("$errno: $errstr");
    fputs($fp, "$domain\n");
    while (!feof($fp))
        echo "<pre>".fgets($fp, 2048)."";
If (isset ($domain))

pipeten 15Oct2006 02:00

Re: WHOIS query using PHP
I wouldn't recommend using this script without register_globals set off.

pipeten 15Oct2006 02:01

Re: WHOIS query using PHP
Still a nice script though (no offence meant)

All times are GMT +5.5. The time now is 03:45.