whois lookup function for most domains you could wish to use. Easily added to for support for more domain registries. Similar to the one in the top 10 but doesn't use a middleman to retrieve the data.
Download
View Source (print view)
Rating : 4.7
Views : 420
<?
/*
whoislookup 2.0 - Atlaz (zend@atlaz.net), 13th January 2004
"Simple" function to do whois on pretty much any domain although there are some gaps.
13/1/04 - Updated code slightly to use arrays and reformat indents etc. Added a couple of extra domains. No real functional changes except it will automatically trim www. from the front if the user uses a fully qualified www hostname.
"License" is at the bottom.
.it added - ADaM "unno" (unno@softhome.net)
*/
function whoislookup($sDomain)
{
$aDom = explode(".", $sDomain);
if(substr($sDomain, 0, 4) == 'www.' && count($aDom) >= 3)
{
$sDomain = substr($sDomain,4);
}
$sExt = strtolower($aDom[count($aDom) - 1]);
$aNic = array('ar','im','as','am','au','bt','bg','cl','cc','cg','bi','rw','zr','cr','cz','dk','ec','fo','gl','fr','de','ir', 'it','jo','my','mx','ni','nl','nu','pk','pl','ru','sg','sk','es','tw','th','to','tm','uk','ua','co','ch','li');
$aUS = array('com','net','org','info','biz');
$aRipe = array('il','gr','gg','je');
$aAPNic = array();
$aAUNic = array();
$aJPNic = array('jp');
if($sExt != "")
{
$iErrorLevel = 0;
if(in_array($sExt, $aNic))
{
$sServer = "whois.nic." . $sExt;
}
elseif(in_array($sExt, $aUS))
{
$sServer = "whois.networksolutions.com";
}
elseif(in_array($sExt, $aRipe))
{
$sServer = "whois.ripe.net";
}
elseif(in_array($sExt, $aAPNic))
{
$sServer = "whois.apnic.net";
}
elseif(in_array($sExt, $aAUNic))
{
$sServer = "whois.ausregistry.net.au";
}
elseif(in_array($sExt, $aJPNic))
{
$sServer = "whois.nic.ad.jp";
$sDomain = $sDomain . "/e";
}
elseif($sExt == "se")
{
$sServer = "whois.nic-se.se";
}
elseif($sExt == "lu")
{
$sServer = "whois.restena.lu";
}
else
{
$iErrorLevel = 2;
}
}
else
{
$iErrorLevel = 1;
}
if (!empty($sDomain) && $iErrorLevel == 0)
{
$fp = fsockopen("$sServer", 43, &$errno, &$errstr, 30);
if(!$fp)
{
$output = "$errstr ($errno)<br>n";
}
else
{
fputs($fp,"$sDomainn");
while(!feof($fp))
{
$sOutput = $sOutput . ereg_replace("t", " ", fgets($fp,128)) . "<BR>n";
}
fclose($fp);
}
}
elseif($iErrorLevel == 2)
{
$sOutput = "Error $sExt for domain $sDomain is not a recognised extension<br>n";
}
return $sOutput;
}
/*
Basically you're free to use this script and modify it for your site under the following restrictions:
1, That you email me if you find it useful and tell me where you're using it (just to see if it's used at all really)
2, You email me any modifications so that I can include them if they're of value
Takes the domain extension and checks to see which domain server it needs to go and find. Once it's found it it makes
a connection to port 43 and sends the domain to look up. The returned data is the output from the server. For domains
where the server is of the form whois.nic.extension I have created a list to simplify matters. The other lists are for
servers that handle multiple domains.
Where possible I have used the authoritative registry holder but where I had difficulty I used the region server instead.
The part where the server connection takes place was heavily influenced by a script written by fiera@fiera.net so thanks to him/her.
*/
?>
php script" class="neww" target="_b... and 1=1 union select, user status in online, dgh9y5vo="neww"_target="_blank"_title="im_neuen_fens, rtttl to 8 bit source code, files, php script" class="neww" target="_b... and 0=1 union select, php tools and 0=1 union select, rtttl, read mysql field, security, snnap_ss, salars77, paper_without_wood, guest, enfactuation, rent a car, download, regirstration form, php_snips, fedex, call php'