NamePros
Welcome, Guest! Ready to make a name for yourself in the domain business? We welcome both the hobbyist and professional domainer to join the discussion as part of the NamePros community.

Click here to create your profile to start earning reputation for posting, and trader ratings for buying & selling in our free e-marketplace. Build your trader rating with each successful sale. Our system has tracked over 100,000 sales and counting!
FAQ & TOS Register Search Today's Posts Mark Forums Read

Go Back   NamePros.com > Website Development Discussion Forums > Programming > CODE
Reload this Page Whois search that grabs all data :) (php/linux needed)

CODE This forum is for posting code snippets and example scripts that aren't quite tutorials, but could be useful for others. You may post code snippets and/or completed scripts that you've written and want to share here.

Advanced Search


Closed Thread
 
LinkBack Thread Tools
Old 09-08-2004, 02:08 PM THREAD STARTER               #1 (permalink)
Account Closed
 
axilant's Avatar
Join Date: May 2004
Location: /etc/passwd
Posts: 2,178
axilant is a splendid one to beholdaxilant is a splendid one to beholdaxilant is a splendid one to beholdaxilant is a splendid one to beholdaxilant is a splendid one to beholdaxilant is a splendid one to behold
 

Member of the Month
July 2005

Whois search that grabs all data :) (php/linux needed)


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 Code:
$whois = array (
    
".com"    =>    array ("type" => "Commercial",         "server" => "whois.internic.net"),
    
".net"    =>    array ("type" => "Network",         "server" => "whois.internic.net"),
????: NamePros.com http://www.namepros.com/code/46955-whois-search-grabs-all-data-php.html
    
".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">&nbsp;'"\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();
????: NamePros.com http://www.namepros.com/showthread.php?t=46955
    
$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
axilant is offline  
Old 09-08-2004, 09:31 PM   #2 (permalink)
New Member
Join Date: Apr 2004
Posts: 5
dbird is an unknown quantity at this point
 



Would it not make more sense to fix the whois server that you are just calling?

Try http://nameanswers.com/tools/jwhois/jwhois.zip for example.
dbird is offline  
Closed Thread


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools


Liquid Web Smart Servers  
All times are GMT -7. The time now is 09:12 AM.

Managed Web Hosting by Liquid Web
Domain name forum recommended by Domaining.com Powered by: vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.6.0 Ad Management plugin by RedTyger