$WhoIsServer
";
$fp = fsockopen($WhoIsServer, 43, $errnr, $errstr);
fputs($fp, "$domain\n");
$found=false;
while(!feof($fp))
{
$result = fgets($fp, 2048);
$whois.=$result;
$result=trim($result);
if(substr($result ,0 ,strlen($WhoIsServerNotFound))==$WhoIsServerNotFound)
{
//libre
}
else if(substr($result ,0 ,strlen($WhoIsServerFound))==$WhoIsServerFound)
$found=true;
}
if($found)
{
echo "Le nom de domaine $domain n'est pas libre!
";
echo "Voici les informations à son sujet:
$whois"; } else echo "Le nom de domaine $domain est libre!"; echo "