Ir para conteúdo
Fórum Script Brasil
  • 0

Pesquisa Whois


Lombardi

Pergunta

Olá pessoal, comecei a tentar aprender PHP esse mês e estava procurando um código para pesquisar domínios no Whois, então encontrei um aqui no site ScriptBrasil e testei no meu server, mas ele não apresenta nenhum resultado. Por isso queria saber se vocês poderiam me ajudar com algumas dicas sobre o problema.

Como o código é muito extenso, segue o link do arquivo a baixo com 2,35kb.

https://www.scriptbrasil.com.br/script/php/domaine.zip

Contudo, se preciso, o postarei aqui.

Editado por Lombardi
Link para o comentário
Compartilhar em outros sites

1 resposta a esta questão

Posts Recomendados

  • 0

O script em questão é o domaine, escrito em PHP 3 ! :o

domaine.php3


<?

header("Cache-Control: no-cache, must-revalidate");
header("Pragma: no-cache");

?>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">

<html>
<head>
<title>Nom de domaine</title>

<?
if (isset($submit)) {

switch ($endfix) {
case '.de':$id=1;break;
case '.com':$id=2;break;
case '.net':$id=3;break;
case '.org':$id=4;break;
case '.lu':$id=5;break;
case '.fr':$id=6;break;
case '.be':$id=7;break;
case '.at':$id=8;break;
case '.it':$id=9;break;
case '.no':$id=10;break;
case '.ac':$id=11;break;
case '.dk':$id=12;break;
case '.cz':$id=13;break;
case '.is':$id=14;break;
case '.sk':$id=15;break;
case '.li':$id=16;break;
case '.ch':$id=17;break;
case '.eu.org':$id=18;break;
case '.sk':$id=19;break;
case '.lt':$id=20;break;
case '.hu':$id=21;break;

default:echo("Fehler !\n");break;
}

$domain=($domainname."".$endfix."");

if ($id==1) {
$WhoIsServer="whois.ripe.net";
$fp = fsockopen ("$WhoIsServer", 43, $errnr, $errstr);
set_socket_blocking($fp,0);
fputs($fp, "$domain\n");
while (!feof($fp)) {
$result = fgets($fp, 2048);
if (substr("$result" ,2, 16) == "No entries found") {
printf("<table border=1 width=640 align=center><tr>");
printf("<td><font face='arial' size='2' color='#4E566B'><b>Le nom de domaine $domain est libre!</b></font></td></tr></table><br><br><br><br><br>");
}

else if (substr("$result" ,0, 7) == "domain:") {
printf ("<table border=1 width=640 align=center><tr>");
printf ("<td><font face='arial' size='2' color='#4E566B'><b>Le nom de domaine $domain n est pas libre</b></font><br><br>");
printf ("<font face='arial' size='2' color='#4E566B'><b>Voulez vous avoir des information a propos de ce domaine? <a href='$PHP_SELF?actio=show&WhoIsServer=$WhoIsServer&domain=$domain' target='_self'>Oui</a> / <a href='#' target='_self'>Non</a> </b></font><br><br></td></tr></table><br><br><br><br><br>");
}
}
fclose($fp);
}

else if ($id==5) {

$WhoIsServer="whois.restena.lu";
$fp = fsockopen ("$WhoIsServer", 43, $errnr, $errstr);
set_socket_blocking($fp, 0);
fputs($fp, "$domain\n");
while (!feof($fp)) {
$result = fgets($fp, 2048);

if (substr("$result" ,2, 16) == "No entries found") {
printf("<table border=1 width=640 align=center><tr>");
printf("<td><font face='arial' size='2' color='#4E566B'><b>Le nom de domaine $domain est libre!</b></font></td></tr></table><br><br><br><br><br>");
}
else if (substr("$result" ,0, 11) == "domainname:") {
printf ("<table border=1 width=640 align=center><tr>");
printf ("<td><font face='arial' size='2' color='#4E566B'><b>Le nom de domaine $domain n est pas libre</b></font><br><br>");
printf ("<font face='arial' size='2' color='#4E566B'><b>Voulez vous avoir des information a propos de ce domaine? <a href='$PHP_SELF?actio=show&WhoIsServer=$WhoIsServer&domain=$domain' target='_self'>Oui</a> / <a href='#' target='_self'>Non</a> </b></font><br><br></td></tr></table><br><br><br><br><br>");
}
}
fclose($fp);
}

// s.o.

else if ($id==6) {
$WhoIsServer="whois.ripe.net";
$fp = fsockopen ("$WhoIsServer", 43, $errnr, $errstr);
set_socket_blocking($fp,0);
fputs($fp, "$domain\n");
while (!feof($fp)) {
$result = fgets($fp, 2048);
if (substr("$result" ,2, 16) == "No entries found") {
printf("<table border=1 width=640 align=center><tr>");
printf("<td><font face='arial' size='2' color='#4E566B'><b>Le nom de domaine $domain est libre!</b></font></td></tr></table><br><br><br><br><br>");
}

else if (substr("$result" ,0, 7) == "domain:") {
printf ("<table border=1 width=640 align=center><tr>");
printf ("<td><font face='arial' size='2' color='#4E566B'><b>Le nom de domaine $domain n est pas libre</b></font><br><br>");
printf ("<font face='arial' size='2' color='#4E566B'><b>Voulez vous avoir des information a propos de ce domaine? <a href='$PHP_SELF?actio=show&WhoIsServer=$WhoIsServer&domain=$domain' target='_self'>Oui</a> / <a href='#' target='_self'>Non</a> </b></font><br><br></td></tr></table><br><br><br><br><br>");
}
}
fclose($fp);
}

//s .o.

else if ($id==7) {
$WhoIsServer="whois.ripe.net";
$fp = fsockopen ("$WhoIsServer", 43, $errnr, $errstr);
set_socket_blocking($fp,0);
fputs($fp, "$domain\n");
while (!feof($fp)) {
$result = fgets($fp, 2048);
if (substr("$result" ,2, 16) == "No entries found") {
printf("<table border=1 width=640 align=center><tr>");
printf("<td><font face='arial' size='2' color='#4E566B'><b>Le nom de domaine $domain est libre!</b></font></td></tr></table><br><br><br><br><br>");
}

else if (substr("$result" ,0, 7) == "domain:") {
printf ("<table border=1 width=640 align=center><tr>");
printf ("<td><font face='arial' size='2' color='#4E566B'><b>Le nom de domaine $domain n est pas libre</b></font><br><br>");
printf ("<font face='arial' size='2' color='#4E566B'><b>Voulez vous avoir des information a propos de ce domaine? <a href='$PHP_SELF?actio=show&WhoIsServer=$WhoIsServer&domain=$domain' target='_self'>Oui</a> / <a href='#' target='_self'>Non</a> </b></font><br><br></td></tr></table><br><br><br><br><br>");
}
}
fclose($fp);
}

//s .o.


else if ($id==8) {
$WhoIsServer="whois.ripe.net";
$fp = fsockopen ("$WhoIsServer", 43, $errnr, $errstr);
set_socket_blocking($fp,0);
fputs($fp, "$domain\n");
while (!feof($fp)) {
$result = fgets($fp, 2048);
if (substr("$result" ,2, 16) == "No entries found") {
printf("<table border=1 width=640 align=center><tr>");
printf("<td><font face='arial' size='2' color='#4E566B'><b>Le nom de domaine $domain est libre!</b></font></td></tr></table><br><br><br><br><br>");
}

else if (substr("$result" ,0, 7) == "domain:") {
printf ("<table border=1 width=640 align=center><tr>");
printf ("<td><font face='arial' size='2' color='#4E566B'><b>Le nom de domaine $domain n est pas libre</b></font><br><br>");
printf ("<font face='arial' size='2' color='#4E566B'><b>Voulez vous avoir des information a propos de ce domaine? <a href='$PHP_SELF?actio=show&WhoIsServer=$WhoIsServer&domain=$domain' target='_self'>Oui</a> / <a href='#' target='_self'>Non</a> </b></font><br><br></td></tr></table><br><br><br><br><br>");
}
}
fclose($fp);
}

//s .o.

else if ($id==9) {
$WhoIsServer="whois.ripe.net";
$fp = fsockopen ("$WhoIsServer", 43, $errnr, $errstr);
set_socket_blocking($fp,0);
fputs($fp, "$domain\n");
while (!feof($fp)) {
$result = fgets($fp, 2048);
if (substr("$result" ,2, 16) == "No entries found") {
printf("<table border=1 width=640 align=center><tr>");
printf("<td><font face='arial' size='2' color='#4E566B'><b>Le nom de domaine $domain est libre!</b></font></td></tr></table><br><br><br><br><br>");
}

else if (substr("$result" ,0, 7) == "domain:") {
printf ("<table border=1 width=640 align=center><tr>");
printf ("<td><font face='arial' size='2' color='#4E566B'><b>Le nom de domaine $domain n est pas libre</b></font><br><br>");
printf ("<font face='arial' size='2' color='#4E566B'><b>Voulez vous avoir des information a propos de ce domaine? <a href='$PHP_SELF?actio=show&WhoIsServer=$WhoIsServer&domain=$domain' target='_self'>Oui</a> / <a href='#' target='_self'>Non</a> </b></font><br><br></td></tr></table><br><br><br><br><br>");
}
}
fclose($fp);
}

//s .o.

else if ($id==10) {
$WhoIsServer="whois.ripe.net";
$fp = fsockopen ("$WhoIsServer", 43, $errnr, $errstr);
set_socket_blocking($fp,0);
fputs($fp, "$domain\n");
while (!feof($fp)) {
$result = fgets($fp, 2048);
if (substr("$result" ,2, 16) == "No entries found") {
printf("<table border=1 width=640 align=center><tr>");
printf("<td><font face='arial' size='2' color='#4E566B'><b>Le nom de domaine $domain est libre!</b></font></td></tr></table><br><br><br><br><br>");
}

else if (substr("$result" ,0, 7) == "domain:") {
printf ("<table border=1 width=640 align=center><tr>");
printf ("<td><font face='arial' size='2' color='#4E566B'><b>Le nom de domaine $domain n est pas libre</b></font><br><br>");
printf ("<font face='arial' size='2' color='#4E566B'><b>Voulez vous avoir des information a propos de ce domaine? <a href='$PHP_SELF?actio=show&WhoIsServer=$WhoIsServer&domain=$domain' target='_self'>Oui</a> / <a href='#' target='_self'>Non</a> </b></font><br><br></td></tr></table><br><br><br><br><br>");
}
}
fclose($fp);
}

//s .o.

else if ($id==11) {
$WhoIsServer="whois.nic.ac";
$fp = fsockopen ("$WhoIsServer", 43, $errnr, $errstr);
set_socket_blocking($fp,0);
fputs($fp, "$domain\n");
while (!feof($fp)) {
$result = fgets($fp, 2048);
if (substr("$result" ,0, 12) == "No match for") {
printf("<table border=1 width=640 align=center><tr>");
printf("<td><font face='arial' size='2' color='#4E566B'><b>Le nom de domaine $domain est libre!</b></font></td></tr></table><br><br><br><br><br>");
}

else if (substr("$result" ,0, 6) == "Domain") {
printf ("<table border=1 width=640 align=center><tr>");
printf ("<td><font face='arial' size='2' color='#4E566B'><b>Le nom de domaine $domain n est pas libre</b></font><br><br>");
printf ("<font face='arial' size='2' color='#4E566B'><b>Voulez vous avoir des information a propos de ce domaine? <a href='$PHP_SELF?actio=show&WhoIsServer=$WhoIsServer&domain=$domain' target='_self'>Oui</a> / <a href='#' target='_self'>Non</a> </b></font><br><br></td></tr></table><br><br><br><br><br>");
}
}
fclose($fp);
}

//s .o.
else if ($id==12) {
$WhoIsServer="whois.ripe.net";
$fp = fsockopen ("$WhoIsServer", 43, $errnr, $errstr);
set_socket_blocking($fp,0);
fputs($fp, "$domain\n");
while (!feof($fp)) {
$result = fgets($fp, 2048);
if (substr("$result" ,2, 16) == "No entries found") {
printf("<table border=1 width=640 align=center><tr>");
printf("<td><font face='arial' size='2' color='#4E566B'><b>Le nom de domaine $domain est libre!</b></font></td></tr></table><br><br><br><br><br>");
}

else if (substr("$result" ,0, 7) == "domain:") {
printf ("<table border=1 width=640 align=center><tr>");
printf ("<td><font face='arial' size='2' color='#4E566B'><b>Le nom de domaine $domain n est pas libre</b></font><br><br>");
printf ("<font face='arial' size='2' color='#4E566B'><b>Voulez vous avoir des information a propos de ce domaine? <a href='$PHP_SELF?actio=show&WhoIsServer=$WhoIsServer&domain=$domain' target='_self'>Oui</a> / <a href='#' target='_self'>Non</a> </b></font><br><br></td></tr></table><br><br><br><br><br>");
}
}
fclose($fp);
}

//s .o.
else if ($id==13) {
$WhoIsServer="whois.ripe.net";
$fp = fsockopen ("$WhoIsServer", 43, $errnr, $errstr);
set_socket_blocking($fp,0);
fputs($fp, "$domain\n");
while (!feof($fp)) {
$result = fgets($fp, 2048);
if (substr("$result" ,2, 16) == "No entries found") {
printf("<table border=1 width=640 align=center><tr>");
printf("<td><font face='arial' size='2' color='#4E566B'><b>Le nom de domaine $domain est libre!</b></font></td></tr></table><br><br><br><br><br>");
}

else if (substr("$result" ,0, 7) == "domain:") {
printf ("<table border=1 width=640 align=center><tr>");
printf ("<td><font face='arial' size='2' color='#4E566B'><b>Le nom de domaine $domain n est pas libre</b></font><br><br>");
printf ("<font face='arial' size='2' color='#4E566B'><b>Voulez vous avoir des information a propos de ce domaine? <a href='$PHP_SELF?actio=show&WhoIsServer=$WhoIsServer&domain=$domain' target='_self'>Oui</a> / <a href='#' target='_self'>Non</a> </b></font><br><br></td></tr></table><br><br><br><br><br>");
}
}
fclose($fp);
}

//s .o.
else if ($id==14) {
$WhoIsServer="whois.ripe.net";
$fp = fsockopen ("$WhoIsServer", 43, $errnr, $errstr);
set_socket_blocking($fp,0);
fputs($fp, "$domain\n");
while (!feof($fp)) {
$result = fgets($fp, 2048);
if (substr("$result" ,2, 16) == "No entries found") {
printf("<table border=1 width=640 align=center><tr>");
printf("<td><font face='arial' size='2' color='#4E566B'><b>Le nom de domaine $domain est libre!</b></font></td></tr></table><br><br><br><br><br>");
}

else if (substr("$result" ,0, 7) == "domain:") {
printf ("<table border=1 width=640 align=center><tr>");
printf ("<td><font face='arial' size='2' color='#4E566B'><b>Le nom de domaine $domain n est pas libre</b></font><br><br>");
printf ("<font face='arial' size='2' color='#4E566B'><b>Voulez vous avoir des information a propos de ce domaine? <a href='$PHP_SELF?actio=show&WhoIsServer=$WhoIsServer&domain=$domain' target='_self'>Oui</a> / <a href='#' target='_self'>Non</a> </b></font><br><br></td></tr></table><br><br><br><br><br>");
}
}
fclose($fp);
}

//s .o.
else if ($id==15) {
$WhoIsServer="whois.ripe.net";
$fp = fsockopen ("$WhoIsServer", 43, $errnr, $errstr);
set_socket_blocking($fp,0);
fputs($fp, "$domain\n");
while (!feof($fp)) {
$result = fgets($fp, 2048);
if (substr("$result" ,2, 16) == "No entries found") {
printf("<table border=1 width=640 align=center><tr>");
printf("<td><font face='arial' size='2' color='#4E566B'><b>Le nom de domaine $domain est libre!</b></font></td></tr></table><br><br><br><br><br>");
}

else if (substr("$result" ,0, 7) == "domain:") {
printf ("<table border=1 width=640 align=center><tr>");
printf ("<td><font face='arial' size='2' color='#4E566B'><b>Le nom de domaine $domain n est pas libre</b></font><br><br>");
printf ("<font face='arial' size='2' color='#4E566B'><b>Voulez vous avoir des information a propos de ce domaine? <a href='$PHP_SELF?actio=show&WhoIsServer=$WhoIsServer&domain=$domain' target='_self'>Oui</a> / <a href='#' target='_self'>Non</a> </b></font><br><br></td></tr></table><br><br><br><br><br>");
}
}
fclose($fp);
}

//s .o.

else if ($id==16) {
$WhoIsServer="whois.ripe.net";
$fp = fsockopen ("$WhoIsServer", 43, $errnr, $errstr);
set_socket_blocking($fp,0);
fputs($fp, "$domain\n");
while (!feof($fp)) {
$result = fgets($fp, 2048);
if (substr("$result" ,0, 16) == "No entries found") {
printf("<table border=1 width=640 align=center><tr>");
printf("<td><font face='arial' size='2' color='#4E566B'><b>Le nom de domaine $domain est libre!</b></font></td></tr></table><br><br><br><br><br>");
}

else if (substr("$result" ,0, 7) == "Domain ") {
printf ("<table border=1 width=640 align=center><tr>");
printf ("<td><font face='arial' size='2' color='#4E566B'><b>Le nom de domaine $domain n est pas libre</b></font><br><br>");
printf ("<font face='arial' size='2' color='#4E566B'><b>Voulez vous avoir des information a propos de ce domaine? <a href='$PHP_SELF?actio=show&WhoIsServer=$WhoIsServer&domain=$domain' target='_self'>Oui</a> / <a href='#' target='_self'>Non</a> </b></font><br><br></td></tr></table><br><br><br><br><br>");
}
}
fclose($fp);
}

//s .o.
else if ($id==17) {
$WhoIsServer="whois.ripe.net";
$fp = fsockopen ("$WhoIsServer", 43, $errnr, $errstr);
set_socket_blocking($fp,0);
fputs($fp, "$domain\n");
while (!feof($fp)) {
$result = fgets($fp, 2048);
if (substr("$result" ,0, 16) == "No entries found") {
printf("<table border=1 width=640 align=center><tr>");
printf("<td><font face='arial' size='2' color='#4E566B'><b>Le nom de domaine $domain est libre!</b></font></td></tr></table><br><br><br><br><br>");
}

else if (substr("$result" ,0, 7) == "Domain ") {
printf ("<table border=1 width=640 align=center><tr>");
printf ("<td><font face='arial' size='2' color='#4E566B'><b>Le nom de domaine $domain n est pas libre</b></font><br><br>");
printf ("<font face='arial' size='2' color='#4E566B'><b>Voulez vous avoir des information a propos de ce domaine? <a href='$PHP_SELF?actio=show&WhoIsServer=$WhoIsServer&domain=$domain' target='_self'>Oui</a> / <a href='#' target='_self'>Non</a> </b></font><br><br></td></tr></table><br><br><br><br><br>");
}
}
fclose($fp);
}

//s .o.
else if ($id==18) {
$WhoIsServer="whois.eu.org";
$fp = fsockopen ("$WhoIsServer", 43, $errnr, $errstr);
set_socket_blocking($fp,0);
fputs($fp, "$domain\n");
while (!feof($fp)) {
$result = fgets($fp, 2048);
if (substr("$result" ,0, 16) == "No entries found") {
printf("<table border=1 width=640 align=center><tr>");
printf("<td><font face='arial' size='2' color='#4E566B'><b>Le nom de domaine $domain est libre!</b></font></td></tr></table><br><br><br><br><br>");
}

else if (substr("$result" ,0, 7) == "domain:") {
printf ("<table border=1 width=640 align=center><tr>");
printf ("<td><font face='arial' size='2' color='#4E566B'><b>Le nom de domaine $domain n est pas libre</b></font><br><br>");
printf ("<font face='arial' size='2' color='#4E566B'><b>Voulez vous avoir des information a propos de ce domaine? <a href='$PHP_SELF?actio=show&WhoIsServer=$WhoIsServer&domain=$domain' target='_self'>Oui</a> / <a href='#' target='_self'>Non</a> </b></font><br><br></td></tr></table><br><br><br><br><br>");
}
}
fclose($fp);
}

//s .o.
else if ($id==19) {
$WhoIsServer="whois.ripe.net";
$fp = fsockopen ("$WhoIsServer", 43, $errnr, $errstr);
set_socket_blocking($fp,0);
fputs($fp, "$domain\n");
while (!feof($fp)) {
$result = fgets($fp, 2048);
if (substr("$result" ,2, 16) == "No entries found") {
printf("<table border=1 width=640 align=center><tr>");
printf("<td><font face='arial' size='2' color='#4E566B'><b>Le nom de domaine $domain est libre!</b></font></td></tr></table><br><br><br><br><br>");
}

else if (substr("$result" ,0, 7) == "domain:") {
printf ("<table border=1 width=640 align=center><tr>");
printf ("<td><font face='arial' size='2' color='#4E566B'><b>Le nom de domaine $domain n est pas libre</b></font><br><br>");
printf ("<font face='arial' size='2' color='#4E566B'><b>Voulez vous avoir des information a propos de ce domaine? <a href='$PHP_SELF?actio=show&WhoIsServer=$WhoIsServer&domain=$domain' target='_self'>Oui</a> / <a href='#' target='_self'>Non</a> </b></font><br><br></td></tr></table><br><br><br><br><br>");
}
}
fclose($fp);
}

//s .o.
else if ($id==20) {
$WhoIsServer="whois.ripe.net";
$fp = fsockopen ("$WhoIsServer", 43, $errnr, $errstr);
set_socket_blocking($fp,0);
fputs($fp, "$domain\n");
while (!feof($fp)) {
$result = fgets($fp, 2048);
if (substr("$result" ,2, 16) == "No entries found") {
printf("<table border=1 width=640 align=center><tr>");
printf("<td><font face='arial' size='2' color='#4E566B'><b>Le nom de domaine $domain est libre!</b></font></td></tr></table><br><br><br><br><br>");
}

else if (substr("$result" ,0, 7) == "domain:") {
printf ("<table border=1 width=640 align=center><tr>");
printf ("<td><font face='arial' size='2' color='#4E566B'><b>Le nom de domaine $domain n est pas libre</b></font><br><br>");
printf ("<font face='arial' size='2' color='#4E566B'><b>Voulez vous avoir des information a propos de ce domaine? <a href='$PHP_SELF?actio=show&WhoIsServer=$WhoIsServer&domain=$domain' target='_self'>Oui</a> / <a href='#' target='_self'>Non</a> </b></font><br><br></td></tr></table><br><br><br><br><br>");
}
}
fclose($fp);
}

//s .o.

else if ($id==21) {
$WhoIsServer="whois.ripe.net";
$fp = fsockopen ("$WhoIsServer", 43, $errnr, $errstr);
set_socket_blocking($fp,0);
fputs($fp, "$domain\n");
while (!feof($fp)) {
$result = fgets($fp, 2048);
if (substr("$result" ,2, 16) == "No entries found") {
printf("<table border=1 width=640 align=center><tr>");
printf("<td><font face='arial' size='2' color='#4E566B'><b>Le nom de domaine $domain est libre!</b></font></td></tr></table><br><br><br><br><br>");
}

else if (substr("$result" ,0, 7) == "domain:") {
printf ("<table border=1 width=640 align=center><tr>");
printf ("<td><font face='arial' size='2' color='#4E566B'><b>Le nom de domaine $domain n est pas libre</b></font><br><br>");
printf ("<font face='arial' size='2' color='#4E566B'><b>Voulez vous avoir des information a propos de ce domaine? <a href='$PHP_SELF?actio=show&WhoIsServer=$WhoIsServer&domain=$domain' target='_self'>Oui</a> / <a href='#' target='_self'>Non</a> </b></font><br><br></td></tr></table><br><br><br><br><br>");
}
}
fclose($fp);
}

//s .o.


else if ($id==2||3||4) {

$fp = fsockopen("whois.crsnic.net", 43, $errno, $errstr);
set_socket_blocking($fp, 0);
fputs($fp, "$domain\n");
while (!feof($fp)) {
$result = trim(fgets($fp, 2048));
if (substr($result,0, 8) == "No match"){
printf("<table border=1 width=640 align=center><tr>");
printf("<td><font face='arial' size='2' color='#4E566B'><b>Le nom de domaine $domain est libre!</b></font></td></tr></table><br><br><br><br><br>");
}
else if (substr($result, 0, 13) == "Whois Server:"){
$WhoIsServer = trim(ereg_replace("Whois Server:"," ",$result));
printf ("<table border=1 width=640 align=center><tr>");
printf ("<td><font face='arial' size='2' color='#4E566B'><b>Le nom de domaine $domain n est pas libre</b></font><br><br>");
printf ("<font face='arial' size='2' color='#4E566B'><b>Voulez vous avoir des information a propos de ce domaine? <a href='$PHP_SELF?actio=show&WhoIsServer=$WhoIsServer&domain=$domain' target='_self'>Oui</a> / <a href='#' target='_self'>Non</a> </b></font><br><br></td></tr></table><br><br><br><br><br>");

}
}
fclose($fp);
}

}

function showtime($domain, $WhoIsServer) {
if ((empty($domain) == false) && (empty($WhoIsServer) == false)) {
$fps = fsockopen ("$WhoIsServer", 43, $errno, $errstr)
or die(printf("Probleme avec le serveur Whois.\n"));
set_socket_blocking($fps, 0);
fputs($fps, "$domain\n");
echo "<table border=1 width=640 align=center><tr><td><PRE>";
while (!feof($fps)) {
$result = fgets($fps, 2048);
echo "$result";
}
echo "</td></tr></table></PRE>";
fclose($fps);
}
else echo("Impossible d'affiche la date.\n");

}

if($actio) {
switch ($actio) {
case show:
showtime($domain, $WhoIsServer);
break;
default: echo ("Probleme dans Switch!");
break;
}


}
?>
</head>

<body>

<table border="0" width="640" align=center>
<tr>
<td width="130" valign="top" align="left"><font face="Arial" size="2"><b>Verification de nom de domaine:</b></font></td>
<td width="283" valign="top" align="left"><form action="<? echo $PHP_SELF ?>" method="POST" target="_self"><font face="Verdana" size="2"><b>www. <input type="text" name="domainname" size="17">&nbsp;&nbsp;&nbsp;<select name="endfix" size="1">
<option name="com" value=".com">.com
<option name="net" value=".net">.net
<option name="org" value=".org">.org
<option name="fr" value=".fr">.fr
<option name="de" value=".de">.de
<option name="ac" value=".ac">.ac
<option name="at" value=".at">.at
<option name="be" value=".be">.be
<option name="ch" value=".ch">.ch
<option name="cz" value=".cz">.cz
<option name="dk" value=".dk">.dk
<option name="eu.org" value=".eu.org">.eu.org
<option name="it" value=".it">.it
<option name="is" value=".is">.is
<option name="hu" value=".hu">.hu
<option name="li" value=".li">.li
<option name="lt" value=".lt">.lt
<option name="lu" value=".lu">.lu
<option name="no" value=".no">.no
<option name="sk" value=".sk">.sk
</select></b></font>
<td width="88" valign="top" align="left"><font face="Arial" size="2"><b><input type="submit" name="submit" value="Verifier"></b></font></td>
<td width="121" valign="top" align="left"><font face="Arial" size="2"><b><input type="reset" value="Effacer"></b></font></td></form>
</tr>


</table>

</body>
</html>
[/codebox]

Rodarei o script aqui e farei algumas adaptações para rodar em PHP 5.

----- EDIT -----

Aqui o script funcionando:

[codebox]
<?php

header("Cache-Control: no-cache, must-revalidate");
header("Pragma: no-cache");

?>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">

<html>
<head>
<title>Nom de domaine</title>

<?php
if (isset($_POST["submit"])) {
$domainname = $_POST["domainname"];
$endfix = $_POST["endfix"];
if (isset($_GET["actio"])){
$actio = $_GET["actio"];
$WhoIsServer = $_GET["WhoIsServer"];
$domain = $_GET["domain"];
}
switch ($endfix) {
case '.de':$id=1;break;
case '.com':$id=2;break;
case '.net':$id=3;break;
case '.org':$id=4;break;
case '.lu':$id=5;break;
case '.fr':$id=6;break;
case '.be':$id=7;break;
case '.at':$id=8;break;
case '.it':$id=9;break;
case '.no':$id=10;break;
case '.ac':$id=11;break;
case '.dk':$id=12;break;
case '.cz':$id=13;break;
case '.is':$id=14;break;
case '.sk':$id=15;break;
case '.li':$id=16;break;
case '.ch':$id=17;break;
case '.eu.org':$id=18;break;
case '.sk':$id=19;break;
case '.lt':$id=20;break;
case '.hu':$id=21;break;

default:echo("Fehler !\n");break;
}

$domain=($domainname."".$endfix."");

if ($id==1) {
$WhoIsServer="whois.ripe.net";
$fp = fsockopen ("$WhoIsServer", 43, $errnr, $errstr);
set_socket_blocking($fp,0);
fputs($fp, "$domain\n");
while (!feof($fp)) {
$result = fgets($fp, 2048);
if (substr("$result" ,2, 16) == "No entries found") {
printf("<table border=1 width=640 align=center><tr>");
printf("<td><font face='arial' size='2' color='#4E566B'><b>Le nom de domaine $domain est libre!</b></font></td></tr></table><br><br><br><br><br>");
}

else if (substr("$result" ,0, 7) == "domain:") {
printf ("<table border=1 width=640 align=center><tr>");
printf ("<td><font face='arial' size='2' color='#4E566B'><b>Le nom de domaine $domain n est pas libre</b></font><br><br>");
printf ("<font face='arial' size='2' color='#4E566B'><b>Voulez vous avoir des information a propos de ce domaine? <a href='$PHP_SELF?actio=show&WhoIsServer=$WhoIsServer&domain=$domain' target='_self'>Oui</a> / <a href='#' target='_self'>Non</a> </b></font><br><br></td></tr></table><br><br><br><br><br>");
}
}
fclose($fp);
}

else if ($id==5) {

$WhoIsServer="whois.restena.lu";
$fp = fsockopen ("$WhoIsServer", 43, $errnr, $errstr);
set_socket_blocking($fp, 0);
fputs($fp, "$domain\n");
while (!feof($fp)) {
$result = fgets($fp, 2048);

if (substr("$result" ,2, 16) == "No entries found") {
printf("<table border=1 width=640 align=center><tr>");
printf("<td><font face='arial' size='2' color='#4E566B'><b>Le nom de domaine $domain est libre!</b></font></td></tr></table><br><br><br><br><br>");
}
else if (substr("$result" ,0, 11) == "domainname:") {
printf ("<table border=1 width=640 align=center><tr>");
printf ("<td><font face='arial' size='2' color='#4E566B'><b>Le nom de domaine $domain n est pas libre</b></font><br><br>");
printf ("<font face='arial' size='2' color='#4E566B'><b>Voulez vous avoir des information a propos de ce domaine? <a href='$PHP_SELF?actio=show&WhoIsServer=$WhoIsServer&domain=$domain' target='_self'>Oui</a> / <a href='#' target='_self'>Non</a> </b></font><br><br></td></tr></table><br><br><br><br><br>");
}
}
fclose($fp);
}

// s.o.

else if ($id==6) {
$WhoIsServer="whois.ripe.net";
$fp = fsockopen ("$WhoIsServer", 43, $errnr, $errstr);
set_socket_blocking($fp,0);
fputs($fp, "$domain\n");
while (!feof($fp)) {
$result = fgets($fp, 2048);
if (substr("$result" ,2, 16) == "No entries found") {
printf("<table border=1 width=640 align=center><tr>");
printf("<td><font face='arial' size='2' color='#4E566B'><b>Le nom de domaine $domain est libre!</b></font></td></tr></table><br><br><br><br><br>");
}

else if (substr("$result" ,0, 7) == "domain:") {
printf ("<table border=1 width=640 align=center><tr>");
printf ("<td><font face='arial' size='2' color='#4E566B'><b>Le nom de domaine $domain n est pas libre</b></font><br><br>");
printf ("<font face='arial' size='2' color='#4E566B'><b>Voulez vous avoir des information a propos de ce domaine? <a href='$PHP_SELF?actio=show&WhoIsServer=$WhoIsServer&domain=$domain' target='_self'>Oui</a> / <a href='#' target='_self'>Non</a> </b></font><br><br></td></tr></table><br><br><br><br><br>");
}
}
fclose($fp);
}

//s .o.

else if ($id==7) {
$WhoIsServer="whois.ripe.net";
$fp = fsockopen ("$WhoIsServer", 43, $errnr, $errstr);
set_socket_blocking($fp,0);
fputs($fp, "$domain\n");
while (!feof($fp)) {
$result = fgets($fp, 2048);
if (substr("$result" ,2, 16) == "No entries found") {
printf("<table border=1 width=640 align=center><tr>");
printf("<td><font face='arial' size='2' color='#4E566B'><b>Le nom de domaine $domain est libre!</b></font></td></tr></table><br><br><br><br><br>");
}

else if (substr("$result" ,0, 7) == "domain:") {
printf ("<table border=1 width=640 align=center><tr>");
printf ("<td><font face='arial' size='2' color='#4E566B'><b>Le nom de domaine $domain n est pas libre</b></font><br><br>");
printf ("<font face='arial' size='2' color='#4E566B'><b>Voulez vous avoir des information a propos de ce domaine? <a href='$PHP_SELF?actio=show&WhoIsServer=$WhoIsServer&domain=$domain' target='_self'>Oui</a> / <a href='#' target='_self'>Non</a> </b></font><br><br></td></tr></table><br><br><br><br><br>");
}
}
fclose($fp);
}

//s .o.


else if ($id==8) {
$WhoIsServer="whois.ripe.net";
$fp = fsockopen ("$WhoIsServer", 43, $errnr, $errstr);
set_socket_blocking($fp,0);
fputs($fp, "$domain\n");
while (!feof($fp)) {
$result = fgets($fp, 2048);
if (substr("$result" ,2, 16) == "No entries found") {
printf("<table border=1 width=640 align=center><tr>");
printf("<td><font face='arial' size='2' color='#4E566B'><b>Le nom de domaine $domain est libre!</b></font></td></tr></table><br><br><br><br><br>");
}

else if (substr("$result" ,0, 7) == "domain:") {
printf ("<table border=1 width=640 align=center><tr>");
printf ("<td><font face='arial' size='2' color='#4E566B'><b>Le nom de domaine $domain n est pas libre</b></font><br><br>");
printf ("<font face='arial' size='2' color='#4E566B'><b>Voulez vous avoir des information a propos de ce domaine? <a href='$PHP_SELF?actio=show&WhoIsServer=$WhoIsServer&domain=$domain' target='_self'>Oui</a> / <a href='#' target='_self'>Non</a> </b></font><br><br></td></tr></table><br><br><br><br><br>");
}
}
fclose($fp);
}

//s .o.

else if ($id==9) {
$WhoIsServer="whois.ripe.net";
$fp = fsockopen ("$WhoIsServer", 43, $errnr, $errstr);
set_socket_blocking($fp,0);
fputs($fp, "$domain\n");
while (!feof($fp)) {
$result = fgets($fp, 2048);
if (substr("$result" ,2, 16) == "No entries found") {
printf("<table border=1 width=640 align=center><tr>");
printf("<td><font face='arial' size='2' color='#4E566B'><b>Le nom de domaine $domain est libre!</b></font></td></tr></table><br><br><br><br><br>");
}

else if (substr("$result" ,0, 7) == "domain:") {
printf ("<table border=1 width=640 align=center><tr>");
printf ("<td><font face='arial' size='2' color='#4E566B'><b>Le nom de domaine $domain n est pas libre</b></font><br><br>");
printf ("<font face='arial' size='2' color='#4E566B'><b>Voulez vous avoir des information a propos de ce domaine? <a href='$PHP_SELF?actio=show&WhoIsServer=$WhoIsServer&domain=$domain' target='_self'>Oui</a> / <a href='#' target='_self'>Non</a> </b></font><br><br></td></tr></table><br><br><br><br><br>");
}
}
fclose($fp);
}

//s .o.

else if ($id==10) {
$WhoIsServer="whois.ripe.net";
$fp = fsockopen ("$WhoIsServer", 43, $errnr, $errstr);
set_socket_blocking($fp,0);
fputs($fp, "$domain\n");
while (!feof($fp)) {
$result = fgets($fp, 2048);
if (substr("$result" ,2, 16) == "No entries found") {
printf("<table border=1 width=640 align=center><tr>");
printf("<td><font face='arial' size='2' color='#4E566B'><b>Le nom de domaine $domain est libre!</b></font></td></tr></table><br><br><br><br><br>");
}

else if (substr("$result" ,0, 7) == "domain:") {
printf ("<table border=1 width=640 align=center><tr>");
printf ("<td><font face='arial' size='2' color='#4E566B'><b>Le nom de domaine $domain n est pas libre</b></font><br><br>");
printf ("<font face='arial' size='2' color='#4E566B'><b>Voulez vous avoir des information a propos de ce domaine? <a href='$PHP_SELF?actio=show&WhoIsServer=$WhoIsServer&domain=$domain' target='_self'>Oui</a> / <a href='#' target='_self'>Non</a> </b></font><br><br></td></tr></table><br><br><br><br><br>");
}
}
fclose($fp);
}

//s .o.

else if ($id==11) {
$WhoIsServer="whois.nic.ac";
$fp = fsockopen ("$WhoIsServer", 43, $errnr, $errstr);
set_socket_blocking($fp,0);
fputs($fp, "$domain\n");
while (!feof($fp)) {
$result = fgets($fp, 2048);
if (substr("$result" ,0, 12) == "No match for") {
printf("<table border=1 width=640 align=center><tr>");
printf("<td><font face='arial' size='2' color='#4E566B'><b>Le nom de domaine $domain est libre!</b></font></td></tr></table><br><br><br><br><br>");
}

else if (substr("$result" ,0, 6) == "Domain") {
printf ("<table border=1 width=640 align=center><tr>");
printf ("<td><font face='arial' size='2' color='#4E566B'><b>Le nom de domaine $domain n est pas libre</b></font><br><br>");
printf ("<font face='arial' size='2' color='#4E566B'><b>Voulez vous avoir des information a propos de ce domaine? <a href='$PHP_SELF?actio=show&WhoIsServer=$WhoIsServer&domain=$domain' target='_self'>Oui</a> / <a href='#' target='_self'>Non</a> </b></font><br><br></td></tr></table><br><br><br><br><br>");
}
}
fclose($fp);
}

//s .o.
else if ($id==12) {
$WhoIsServer="whois.ripe.net";
$fp = fsockopen ("$WhoIsServer", 43, $errnr, $errstr);
set_socket_blocking($fp,0);
fputs($fp, "$domain\n");
while (!feof($fp)) {
$result = fgets($fp, 2048);
if (substr("$result" ,2, 16) == "No entries found") {
printf("<table border=1 width=640 align=center><tr>");
printf("<td><font face='arial' size='2' color='#4E566B'><b>Le nom de domaine $domain est libre!</b></font></td></tr></table><br><br><br><br><br>");
}

else if (substr("$result" ,0, 7) == "domain:") {
printf ("<table border=1 width=640 align=center><tr>");
printf ("<td><font face='arial' size='2' color='#4E566B'><b>Le nom de domaine $domain n est pas libre</b></font><br><br>");
printf ("<font face='arial' size='2' color='#4E566B'><b>Voulez vous avoir des information a propos de ce domaine? <a href='$PHP_SELF?actio=show&WhoIsServer=$WhoIsServer&domain=$domain' target='_self'>Oui</a> / <a href='#' target='_self'>Non</a> </b></font><br><br></td></tr></table><br><br><br><br><br>");
}
}
fclose($fp);
}

//s .o.
else if ($id==13) {
$WhoIsServer="whois.ripe.net";
$fp = fsockopen ("$WhoIsServer", 43, $errnr, $errstr);
set_socket_blocking($fp,0);
fputs($fp, "$domain\n");
while (!feof($fp)) {
$result = fgets($fp, 2048);
if (substr("$result" ,2, 16) == "No entries found") {
printf("<table border=1 width=640 align=center><tr>");
printf("<td><font face='arial' size='2' color='#4E566B'><b>Le nom de domaine $domain est libre!</b></font></td></tr></table><br><br><br><br><br>");
}

else if (substr("$result" ,0, 7) == "domain:") {
printf ("<table border=1 width=640 align=center><tr>");
printf ("<td><font face='arial' size='2' color='#4E566B'><b>Le nom de domaine $domain n est pas libre</b></font><br><br>");
printf ("<font face='arial' size='2' color='#4E566B'><b>Voulez vous avoir des information a propos de ce domaine? <a href='$PHP_SELF?actio=show&WhoIsServer=$WhoIsServer&domain=$domain' target='_self'>Oui</a> / <a href='#' target='_self'>Non</a> </b></font><br><br></td></tr></table><br><br><br><br><br>");
}
}
fclose($fp);
}

//s .o.
else if ($id==14) {
$WhoIsServer="whois.ripe.net";
$fp = fsockopen ("$WhoIsServer", 43, $errnr, $errstr);
set_socket_blocking($fp,0);
fputs($fp, "$domain\n");
while (!feof($fp)) {
$result = fgets($fp, 2048);
if (substr("$result" ,2, 16) == "No entries found") {
printf("<table border=1 width=640 align=center><tr>");
printf("<td><font face='arial' size='2' color='#4E566B'><b>Le nom de domaine $domain est libre!</b></font></td></tr></table><br><br><br><br><br>");
}

else if (substr("$result" ,0, 7) == "domain:") {
printf ("<table border=1 width=640 align=center><tr>");
printf ("<td><font face='arial' size='2' color='#4E566B'><b>Le nom de domaine $domain n est pas libre</b></font><br><br>");
printf ("<font face='arial' size='2' color='#4E566B'><b>Voulez vous avoir des information a propos de ce domaine? <a href='$PHP_SELF?actio=show&WhoIsServer=$WhoIsServer&domain=$domain' target='_self'>Oui</a> / <a href='#' target='_self'>Non</a> </b></font><br><br></td></tr></table><br><br><br><br><br>");
}
}
fclose($fp);
}

//s .o.
else if ($id==15) {
$WhoIsServer="whois.ripe.net";
$fp = fsockopen ("$WhoIsServer", 43, $errnr, $errstr);
set_socket_blocking($fp,0);
fputs($fp, "$domain\n");
while (!feof($fp)) {
$result = fgets($fp, 2048);
if (substr("$result" ,2, 16) == "No entries found") {
printf("<table border=1 width=640 align=center><tr>");
printf("<td><font face='arial' size='2' color='#4E566B'><b>Le nom de domaine $domain est libre!</b></font></td></tr></table><br><br><br><br><br>");
}

else if (substr("$result" ,0, 7) == "domain:") {
printf ("<table border=1 width=640 align=center><tr>");
printf ("<td><font face='arial' size='2' color='#4E566B'><b>Le nom de domaine $domain n est pas libre</b></font><br><br>");
printf ("<font face='arial' size='2' color='#4E566B'><b>Voulez vous avoir des information a propos de ce domaine? <a href='$PHP_SELF?actio=show&WhoIsServer=$WhoIsServer&domain=$domain' target='_self'>Oui</a> / <a href='#' target='_self'>Non</a> </b></font><br><br></td></tr></table><br><br><br><br><br>");
}
}
fclose($fp);
}

//s .o.

else if ($id==16) {
$WhoIsServer="whois.ripe.net";
$fp = fsockopen ("$WhoIsServer", 43, $errnr, $errstr);
set_socket_blocking($fp,0);
fputs($fp, "$domain\n");
while (!feof($fp)) {
$result = fgets($fp, 2048);
if (substr("$result" ,0, 16) == "No entries found") {
printf("<table border=1 width=640 align=center><tr>");
printf("<td><font face='arial' size='2' color='#4E566B'><b>Le nom de domaine $domain est libre!</b></font></td></tr></table><br><br><br><br><br>");
}

else if (substr("$result" ,0, 7) == "Domain ") {
printf ("<table border=1 width=640 align=center><tr>");
printf ("<td><font face='arial' size='2' color='#4E566B'><b>Le nom de domaine $domain n est pas libre</b></font><br><br>");
printf ("<font face='arial' size='2' color='#4E566B'><b>Voulez vous avoir des information a propos de ce domaine? <a href='$PHP_SELF?actio=show&WhoIsServer=$WhoIsServer&domain=$domain' target='_self'>Oui</a> / <a href='#' target='_self'>Non</a> </b></font><br><br></td></tr></table><br><br><br><br><br>");
}
}
fclose($fp);
}

//s .o.
else if ($id==17) {
$WhoIsServer="whois.ripe.net";
$fp = fsockopen ("$WhoIsServer", 43, $errnr, $errstr);
set_socket_blocking($fp,0);
fputs($fp, "$domain\n");
while (!feof($fp)) {
$result = fgets($fp, 2048);
if (substr("$result" ,0, 16) == "No entries found") {
printf("<table border=1 width=640 align=center><tr>");
printf("<td><font face='arial' size='2' color='#4E566B'><b>Le nom de domaine $domain est libre!</b></font></td></tr></table><br><br><br><br><br>");
}

else if (substr("$result" ,0, 7) == "Domain ") {
printf ("<table border=1 width=640 align=center><tr>");
printf ("<td><font face='arial' size='2' color='#4E566B'><b>Le nom de domaine $domain n est pas libre</b></font><br><br>");
printf ("<font face='arial' size='2' color='#4E566B'><b>Voulez vous avoir des information a propos de ce domaine? <a href='$PHP_SELF?actio=show&WhoIsServer=$WhoIsServer&domain=$domain' target='_self'>Oui</a> / <a href='#' target='_self'>Non</a> </b></font><br><br></td></tr></table><br><br><br><br><br>");
}
}
fclose($fp);
}

//s .o.
else if ($id==18) {
$WhoIsServer="whois.eu.org";
$fp = fsockopen ("$WhoIsServer", 43, $errnr, $errstr);
set_socket_blocking($fp,0);
fputs($fp, "$domain\n");
while (!feof($fp)) {
$result = fgets($fp, 2048);
if (substr("$result" ,0, 16) == "No entries found") {
printf("<table border=1 width=640 align=center><tr>");
printf("<td><font face='arial' size='2' color='#4E566B'><b>Le nom de domaine $domain est libre!</b></font></td></tr></table><br><br><br><br><br>");
}

else if (substr("$result" ,0, 7) == "domain:") {
printf ("<table border=1 width=640 align=center><tr>");
printf ("<td><font face='arial' size='2' color='#4E566B'><b>Le nom de domaine $domain n est pas libre</b></font><br><br>");
printf ("<font face='arial' size='2' color='#4E566B'><b>Voulez vous avoir des information a propos de ce domaine? <a href='$PHP_SELF?actio=show&WhoIsServer=$WhoIsServer&domain=$domain' target='_self'>Oui</a> / <a href='#' target='_self'>Non</a> </b></font><br><br></td></tr></table><br><br><br><br><br>");
}
}
fclose($fp);
}

//s .o.
else if ($id==19) {
$WhoIsServer="whois.ripe.net";
$fp = fsockopen ("$WhoIsServer", 43, $errnr, $errstr);
set_socket_blocking($fp,0);
fputs($fp, "$domain\n");
while (!feof($fp)) {
$result = fgets($fp, 2048);
if (substr("$result" ,2, 16) == "No entries found") {
printf("<table border=1 width=640 align=center><tr>");
printf("<td><font face='arial' size='2' color='#4E566B'><b>Le nom de domaine $domain est libre!</b></font></td></tr></table><br><br><br><br><br>");
}

else if (substr("$result" ,0, 7) == "domain:") {
printf ("<table border=1 width=640 align=center><tr>");
printf ("<td><font face='arial' size='2' color='#4E566B'><b>Le nom de domaine $domain n est pas libre</b></font><br><br>");
printf ("<font face='arial' size='2' color='#4E566B'><b>Voulez vous avoir des information a propos de ce domaine? <a href='$PHP_SELF?actio=show&WhoIsServer=$WhoIsServer&domain=$domain' target='_self'>Oui</a> / <a href='#' target='_self'>Non</a> </b></font><br><br></td></tr></table><br><br><br><br><br>");
}
}
fclose($fp);
}

//s .o.
else if ($id==20) {
$WhoIsServer="whois.ripe.net";
$fp = fsockopen ("$WhoIsServer", 43, $errnr, $errstr);
set_socket_blocking($fp,0);
fputs($fp, "$domain\n");
while (!feof($fp)) {
$result = fgets($fp, 2048);
if (substr("$result" ,2, 16) == "No entries found") {
printf("<table border=1 width=640 align=center><tr>");
printf("<td><font face='arial' size='2' color='#4E566B'><b>Le nom de domaine $domain est libre!</b></font></td></tr></table><br><br><br><br><br>");
}

else if (substr("$result" ,0, 7) == "domain:") {
printf ("<table border=1 width=640 align=center><tr>");
printf ("<td><font face='arial' size='2' color='#4E566B'><b>Le nom de domaine $domain n est pas libre</b></font><br><br>");
printf ("<font face='arial' size='2' color='#4E566B'><b>Voulez vous avoir des information a propos de ce domaine? <a href='$PHP_SELF?actio=show&WhoIsServer=$WhoIsServer&domain=$domain' target='_self'>Oui</a> / <a href='#' target='_self'>Non</a> </b></font><br><br></td></tr></table><br><br><br><br><br>");
}
}
fclose($fp);
}

//s .o.

else if ($id==21) {
$WhoIsServer="whois.ripe.net";
$fp = fsockopen ("$WhoIsServer", 43, $errnr, $errstr);
set_socket_blocking($fp,0);
fputs($fp, "$domain\n");
while (!feof($fp)) {
$result = fgets($fp, 2048);
if (substr("$result" ,2, 16) == "No entries found") {
printf("<table border=1 width=640 align=center><tr>");
printf("<td><font face='arial' size='2' color='#4E566B'><b>Le nom de domaine $domain est libre!</b></font></td></tr></table><br><br><br><br><br>");
}

else if (substr("$result" ,0, 7) == "domain:") {
printf ("<table border=1 width=640 align=center><tr>");
printf ("<td><font face='arial' size='2' color='#4E566B'><b>Le nom de domaine $domain n est pas libre</b></font><br><br>");
printf ("<font face='arial' size='2' color='#4E566B'><b>Voulez vous avoir des information a propos de ce domaine? <a href='$PHP_SELF?actio=show&WhoIsServer=$WhoIsServer&domain=$domain' target='_self'>Oui</a> / <a href='#' target='_self'>Non</a> </b></font><br><br></td></tr></table><br><br><br><br><br>");
}
}
fclose($fp);
}

//s .o.


else if ($id==2||3||4) {

$fp = fsockopen("whois.crsnic.net", 43, $errno, $errstr);
set_socket_blocking($fp, 0);
fputs($fp, "$domain\n");
while (!feof($fp)) {
$result = trim(fgets($fp, 2048));
if (substr($result,0, 8) == "No match"){
printf("<table border=1 width=640 align=center><tr>");
printf("<td><font face='arial' size='2' color='#4E566B'><b>Le nom de domaine $domain est libre!</b></font></td></tr></table><br><br><br><br><br>");
}
else if (substr($result, 0, 13) == "Whois Server:"){
$WhoIsServer = trim(ereg_replace("Whois Server:"," ",$result));
printf ("<table border=1 width=640 align=center><tr>");
printf ("<td><font face='arial' size='2' color='#4E566B'><b>Le nom de domaine $domain n est pas libre</b></font><br><br>");
printf ("<font face='arial' size='2' color='#4E566B'><b>Voulez vous avoir des information a propos de ce domaine? <a href='$PHP_SELF?actio=show&WhoIsServer=$WhoIsServer&domain=$domain' target='_self'>Oui</a> / <a href='#' target='_self'>Non</a> </b></font><br><br></td></tr></table><br><br><br><br><br>");

}
}
fclose($fp);
}

}

function showtime($domain, $WhoIsServer) {
if ((empty($domain) == false) && (empty($WhoIsServer) == false)) {
$fps = fsockopen ("$WhoIsServer", 43, $errno, $errstr)
or die(printf("Probleme avec le serveur Whois.\n"));
set_socket_blocking($fps, 0);
fputs($fps, "$domain\n");
echo "<table border=1 width=640 align=center><tr><td><PRE>";
while (!feof($fps)) {
$result = fgets($fps, 2048);
echo "$result";
}
echo "</td></tr></table></PRE>";
fclose($fps);
}
else echo("Impossible d'affiche la date.\n");

}

if($actio) {
switch ($actio) {
case show:
showtime($domain, $WhoIsServer);
break;
default: echo ("Probleme dans Switch!");
break;
}


}
?>
</head>

<body>

<table border="0" width="640" align=center>
<tr>
<td width="130" valign="top" align="left"><font face="Arial" size="2"><b>Verification de nom de domaine:</b></font></td>
<td width="283" valign="top" align="left"><form action="<? echo $PHP_SELF ?>" method="POST" target="_self"><font face="Verdana" size="2"><b>www. <input type="text" name="domainname" size="17">&nbsp;&nbsp;&nbsp;<select name="endfix" size="1">
<option name="com" value=".com">.com
<option name="net" value=".net">.net
<option name="org" value=".org">.org
<option name="fr" value=".fr">.fr
<option name="de" value=".de">.de
<option name="ac" value=".ac">.ac
<option name="at" value=".at">.at
<option name="be" value=".be">.be
<option name="ch" value=".ch">.ch
<option name="cz" value=".cz">.cz
<option name="dk" value=".dk">.dk
<option name="eu.org" value=".eu.org">.eu.org
<option name="it" value=".it">.it
<option name="is" value=".is">.is
<option name="hu" value=".hu">.hu
<option name="li" value=".li">.li
<option name="lt" value=".lt">.lt
<option name="lu" value=".lu">.lu
<option name="no" value=".no">.no
<option name="sk" value=".sk">.sk
</select></b></font>
<td width="88" valign="top" align="left"><font face="Arial" size="2"><b><input type="submit" name="submit" value="Verifier"></b></font></td>
<td width="121" valign="top" align="left"><font face="Arial" size="2"><b><input type="reset" value="Effacer"></b></font></td></form>
</tr>


</table>

</body>
</html>

Link para o comentário
Compartilhar em outros sites

Participe da discussão

Você pode postar agora e se registrar depois. Se você já tem uma conta, acesse agora para postar com sua conta.

Visitante
Responder esta pergunta...

×   Você colou conteúdo com formatação.   Remover formatação

  Apenas 75 emoticons são permitidos.

×   Seu link foi incorporado automaticamente.   Exibir como um link em vez disso

×   Seu conteúdo anterior foi restaurado.   Limpar Editor

×   Você não pode colar imagens diretamente. Carregar ou inserir imagens do URL.



  • Estatísticas dos Fóruns

    • Tópicos
      152,2k
    • Posts
      652,1k
×
×
  • Criar Novo...