/*
Designed and Developed by:
Deepak rana
drana1677@gmail.com
explanation:
self explantory
*/
//extract($_POST);
function whois($domain,$ext){
$url=$domain.$ext;
/*
Use a switch() statement to determine which whois
server is the best to use for the entered domain.
*/
switch($ext){
case ".co.uk":
$whois = "whois.nic.uk";
break;
case ".com":
$whois = "whois.networksolutions.com";
break;
case ".fr":
$whois = "whois.nic.fr";
break;
case ".biz":
$whois = "whois.biz";
break;
default:
$whois = "whois.networksolutions.com";
}
if (trim($url) <> "") {
$url = trim($url);
/*
Open the connection to the above whois server
*/
$whois = "whois.nic.fr";
$f = fsockopen($whois, 43, $errno, $errstr, 30);
if (!$f) {
echo "Connection To Server Failed ($errno)";
} else {
/*
Send the domain to the server and return the
results
*/
fputs($f, "$url\r\n");
print "
while (!feof($f)) {
echo fread($f,128);
}
print "
";/*Designed and Developed by:
Deepak rana
drana1677@gmail.com
explanation:
self explantory
*/
//extract($_POST);
function whois($domain,$ext){
$url=$domain.$ext;
/*
Use a switch() statement to determine which whois
server is the best to use for the entered domain.
*/
switch($ext){
case ".co.uk":
$whois = "whois.nic.uk";
break;
case ".com":
$whois = "whois.networksolutions.com";
break;
case ".fr":
$whois = "whois.nic.fr";
break;
case ".biz":
$whois = "whois.biz";
break;
default:
$whois = "whois.networksolutions.com";
}
if (trim($url) <> "") {
$url = trim($url);
/*
Open the connection to the above whois server
*/
$whois = "whois.nic.fr";
$f = fsockopen($whois, 43, $errno, $errstr, 30);
if (!$f) {
echo "Connection To Server Failed ($errno)";
} else {
/*
Send the domain to the server and return the
results
*/
fputs($f, "$url\r\n");
print "
\r\n";
while (!feof($f)) {
echo fread($f,128);
}
print "
Use fclose to close the connection to the whois
server
*/
fclose($f);
}
}else{
echo "Invalid domain entered";
}
}
?>
0 comments:
Post a Comment