IT.COM

Whois search that grabs all data (Php/linux needed)

Spaceship
Watch

axilant

Account Closed
Impact
28
I'v been seeing alot of (not all just some) that the data doesnt comeup without using a gay script to redirect to a whois server and get all the data well, since linux is the best (windows drolls linux rules :)) heres a code that uses php's system() must have linux for it to work: (server software)

PHP:
$whois = array (
    ".com"    =>    array ("type" => "Commercial",         "server" => "whois.internic.net"),
    ".net"    =>    array ("type" => "Network",         "server" => "whois.internic.net"),
    ".org"    =>    array ("type" => "Organisation",    "server" => "whois.internic.net"),
    ".edu"    =>    array ("type" => "Education",         "server" => "whois.internic.net"),
    ".gov"    =>    array ("type" => "Government",         "server" => "whois.nic.gov"),
    ".biz"    =>    array ("type" => "Business",         "server" => "whois.pacificroot.com"),
    ".name"    =>    array ("type" => "Name",         "server" => "whois.nic.name"),
    ".info"    =>    array ("type" => "Information",     "server" => "whois.afilias.info"),
    ".au"    =>    array ("type" => "Australia",         "server" => "whois.ausregistry.net"),
    ".ca"    =>    array ("type" => "Canada",         "server" => "whois.cira.ca"),
    ".de"    =>    array ("type" => "Germany",         "server" => "whois.denic.de"),
    ".dk"    =>    array ("type" => "Denmark",         "server" => "whois.dk-hostmaster.dk"),
    ".fr"    =>    array ("type" => "France",         "server" => "whois.nic.fr"),
    ".ru"    =>    array ("type" => "Russia",         "server" => "whois.ripn.net"),
    ".uk"    =>    array ("type" => "United Kingdom",     "server" => "whois.nic.uk"),
    ".us"    =>    array ("type" => "United States",     "server" => "whois.us"),
);

echo "<HTML>\n";
echo "<HEAD>\n";
echo "    <TITLE>Whois</TITLE>\n";
echo "</HEAD>\n\n";
echo "<BODY>\n";
echo '    <FORM METHOD="POST" ACTION="', "{$PHP_SELF}", '">', "\n";
echo '        Domain: <INPUT TYPE="text" NAME="domain" VALUE="', "{$domain}", '" SIZE="30"> ', "\n";
echo '        <INPUT TYPE="submit" VALUE="Lookup">', "\n";
echo '    </FORM>';

if (!empty ($domain))
{
    echo '<BR>', "\n", '<HR NOSHADE>', "\n";

    $tld = explode (".", $domain);
    $tld = "." . $tld[count($tld)-1];
    if (!array_key_exists ($tld, $whois))
    {
        die ("This script currently does not support the {$tld} TLD.");
    }

    ob_start();
    system ("whois -h {$whois[$tld]["server"]} {$domain}");
    $whoisdata = ob_get_contents();
    ob_end_clean();
    $whoisdata_txt = "<textarea cols=\"150\" rows=\"15\" readonly style=\"font:11px tahoma;\">$whoisdata</textarea>";
    print_r (eregi_replace ("\n", "\n", $whoisdata_txt));
}

echo '    </BODY>', "\n", '</HTML>', "\n";

This code is not completly programmed by me, but i did make it work. Im also making a mysql version for multiple servers :)

When its done it will be for sale, $20, please dont PM me asking when its done. Im a huge "HUGE" php freelancer with 75+ freelance jobs at all times, i do this on my own time. Plus im a school student in highschool.

Thanks,
Cody Selzer
 
0
•••
The views expressed on this page by users and staff are their own, not those of NamePros.
0
•••
  • The sidebar remains visible by scrolling at a speed relative to the page’s height.
Back