posto questo script che mi sembra piu semplice che da sul dominio il risultato avaiable o no avaiable
Codice PHP:
<?php
/*
    MRWhois v. 4.0 PRO - a Whois lookup script written in PHP.
    Copyright (C) 2001-2004 Marek Rozanski
    [url]http://www.mrscripts.co.uk[/url]
*/
    
include_once ("mrwhois_config.php");
    include_once (
FILE_NAME_LANGUAGE);
    
error_reporting E_WARNING | ~ E_NOTICE ) ; 
?>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=<? echo META_CHARSET?>">
    <meta http-equiv="Content-Language" content="<? echo META_LANGUAGE?>">
    <title><? echo PAGE_TITLE_META?></title>
    <link href="<? echo FILE_NAME_STYLE?>" rel="stylesheet" type="text/css">
    <script type=text/javascript>
        var win= null;
        function NewWindow(mypage,myname,w,h,scroll)
        {
            var winl = (screen.width-w)/2;
              var wint = (screen.height-h)/2;
            var settings  ="height="+h+",";
            settings +="width="+w+",";
            settings +="top="+wint+",";
            settings +="left="+winl+",";
            settings +="scrollbars="+scroll+",";
            settings +="resizable=yes";
            win=window.open(mypage,myname,settings);
            if(parseInt(navigator.appVersion) >= 4){win.window.focus();}
        }
    </script>
</head>


<php?
    if (DISPLAY_RESULT_HEADER) include_once (FILE_NAME_HEADER);

    $type = $_POST['type'];
    $ddomain = $_POST['ddomain'];

    if ($type!="") define('TYPE', $type); else define('TYPE', '');
    if ($ddomain!="") { $_ddomain = trim($ddomain); define('DDOMAIN', $_ddomain);    }
    else define('DDOMAIN', '');
    
//    echo "Debug info:
";
//    echo "TYPE: " . TYPE . "
";
//    echo "DDOMAIN: " . DDOMAIN;

    function extracheck($exdomain,$exserver,$exmatch)
    {
        $exns = fsockopen($exserver,43); fputs($exns,"$exdomain\r\n");
        $exresult = "";
        while(!feof($exns)) $exresult .= fgets($exns,128); fclose($exns);
        if (eregi($exmatch,$exresult))
        {
            $iss = "1";
        } else {
            $iss = "0";
        }
        return $iss;
    }

    function dispav($what,$reglink,$justname,$justtld,$iscname)
    {
        echo '<tr><td nowrap class="available">[b]'.$what.'[/b]';
        if ($iscname=="1") echo ' '.CANONICAL_TEXT;
        echo '</td>
        <td nowrap align="center" class="available">[b]'.AVAILABLE_TEXT.'[/b]</td>
        <td nowrap align="center">';
        // choose the action according to the further processing method:
        if (PROCESSING_TYPE=="2")    // further processing using FORM/POST
        { echo '<input type="Checkbox" name="'.$justtld.'" value="1">'; }
        else if (PROCESSING_TYPE=="3")    // further processing using link/GET
        { echo '[url="'.LINK_EXTERNAL.'?alldomain='.$what.'&domain='.$justname.'&tld='.$justtld.'"]'.LINK_REGISTER_TEXT.'[/url]'; }
        else // just affiliate link
        {
            if ($reglink!="" and REG_LINK)
            { echo '[url="'.$reglink.'"]'.LINK_REGISTER_TEXT.'[/url]'; }
            else if ($reglink=="" and REG_LINK)
            { echo '[url="'.LINK_AFFILIATE.'"]'.LINK_REGISTER_TEXT.'[/url]'; }
            else
            { echo ''; }
        }
        echo '</td></tr>';
    }

    function dispun($what,$where) {
        echo '<tr>
        <td nowrap class="notavailable">[b]'.$what.'[/b]</td>
        <td nowrap align="center" class="notavailable">[b]'.NOT_AVAILABLE_TEXT.'[/b]</td>
        <td nowrap align="center">
        <a href="'.FILE_NAME_DETAILS.'?ddomain='.$what.'&server='.$where.'" onMouseOver="window.status=\''.STATUS_BAR_DETAILS.' '.$what.'\';return true" onMouseOut="window.status=\'\';return true" onClick="NewWindow(this.href,\'details\',\'620\',\'400\',\'yes\');return false;">
        '.LINK_TAKEN_DETAILS.'</a>';
        if (USE_GOTO_LINK)
        {
            echo ' / [url="http://www.'.$what.'"]'.LINK_TAKEN_GOTO.'[/url]';
        }
        echo '</td></tr>';
    }

    function disperror($text) {
        echo '<table align="center" width="600" border="0" cellspacing="0" cellpadding="0">
        <tr><td width="100%" class="windowborder">
        <table width="600" border="0" cellspacing="1" cellpadding="2">
        <tr><td class="windowinside">';
        echo '<center><b class="errors">'.$text.'[/b]</center>';
        echo '</td></tr></table></td></tr></table>';
    }


    if (WAIT_LAYER_ENABLED)
    {
    ?>
        <script language=javascript>
            var ie4 = (document.all) ? true : false;
            var ns4 = (document.layers) ? true : false;
            var ns6 = (document.getElementById && !document.all) ? true : false;
            function hidelayer(lay) {
                //if (ie4) {document.waitlayer.visible = False; }
                if (ie4) {document.all[lay].style.visibility = "hidden";}
                if (ns4) {document.layers[lay].visibility = "hide";}
                if (ns6) {document.getElementById([lay]).style.display = "none";}
            }
            function showlayer(lay) {
                if (ie4) {document.all[lay].style.visibility = "visible";}
                if (ns4) {document.layers[lay].visibility = "show";}
                if (ns6) {document.getElementById([lay]).style.display = "block";}
            }
            var laywidth  = screen.width/2;
            var layheight = screen.height/2;
            var layl   = (screen.width-laywidth)/2;
              var layt   = (screen.height-layheight)/2;
            document.write("<div name='waitlayer' id='waitlayer' align='center' style='position:absolute; width:"+laywidth+"px; height:"+layheight+"px; z-index:-1; left:"+layl+"px; top:"+layt+"px; visibility: visible;'><p align=center>[b]<? echo WAIT_TITLE?>[/b]

[url='<? echo FILE_NAME?>']<? echo WAIT_MESSAGE?>[/url]</p></div>");
        </script>
    <?
    
}

    
// Domain name error handling:

    
if(TYPE!="name" and strlen(DDOMAIN) < 3)
    {
        
disperror(ERROR_TOO_SHORT);
        if (
REPEAT_SEARCH_WINDOW) include_once(FILE_NAME);
        if (
WAIT_LAYER_ENABLED) echo '<script language="javascript">hidelayer("waitlayer");</script>';
        if (
DISPLAY_RESULT_FOOTER) include_once(FILE_NAME_FOOTER);
        exit;
    }
    if(
TYPE!="name" and strlen(DDOMAIN) > 63)
    {
        
disperror(ERROR_TOO_LONG);
        if (
REPEAT_SEARCH_WINDOW) include_once(FILE_NAME);
        if (
WAIT_LAYER_ENABLED) echo '<script language="javascript">hidelayer("waitlayer");</script>';
        if (
DISPLAY_RESULT_FOOTER) include_once(FILE_NAME_FOOTER);
        exit;
    }
    if(
TYPE!="name" and ereg("^-|-$",DDOMAIN))
    {
        
disperror(ERROR_HYPHEN);
        if (
REPEAT_SEARCH_WINDOW) include_once(FILE_NAME);
        if (
WAIT_LAYER_ENABLED) echo '<script language="javascript">hidelayer("waitlayer");</script>';
        if (
DISPLAY_RESULT_FOOTER) include_once(FILE_NAME_FOOTER);
        exit;
    }
    if(
TYPE!="name" and !ereg("([a-z]|[A-Z]|[0-9]|-){".strlen(DDOMAIN)."}",DDOMAIN))
    {
        
disperror(ERROR_CHARACTERS);
        if (
REPEAT_SEARCH_WINDOW) include_once(FILE_NAME);
        if (
WAIT_LAYER_ENABLED) echo '<script language="javascript">hidelayer("waitlayer");</script>';
        if (
DISPLAY_RESULT_FOOTER) include_once(FILE_NAME_FOOTER);
        exit;
    }
    if(
TYPE=="name")
    {
        if (!
eregi("\.",DDOMAIN))
        {
            
disperror(ERROR_NAME_DOT);
            if (
REPEAT_SEARCH_WINDOW) include_once(FILE_NAME);
            if (
WAIT_LAYER_ENABLED) echo '<script language="javascript">hidelayer("waitlayer");</script>';
            if (
DISPLAY_RESULT_FOOTER) include_once(FILE_NAME_FOOTER);
            exit;
        }
        else
        {
            list(
$leftpart$rightpart) = explode(".",DDOMAIN);
            if (
strlen($rightpart)<3)
            {
                
disperror(ERROR_NAME_LEN);
                if (
REPEAT_SEARCH_WINDOW) include_once(FILE_NAME);
                if (
WAIT_LAYER_ENABLED) echo '<script language="javascript">hidelayer("waitlayer");</script>';
                if (
DISPLAY_RESULT_FOOTER) include_once(FILE_NAME_FOOTER);
                exit;
            }
        }
    }

    if (
PROCESSING_TYPE=="2")
    {
        echo 
'<form action="'.LINK_EXTERNAL.'" method="POST">';
        echo 
'<input type="hidden" name="domain" value="'.DDOMAIN.'">';
    }

    echo 
'<table align="center" width="600" border="0" cellspacing="0" cellpadding="0">
        <tr><td width="100%" class="windowborder"><table width="600" border="0" cellspacing="1" cellpadding="2">
        <tr><td class="windowinside"><table width="100%" align="center" cellspacing="0" cellpadding="1">
        <tr>
            <td nowrap align="center" class="separator">[b]Domain[/b]</td>
            <td nowrap align="center" class="separator">[b]Status[/b]</td>
            <td nowrap align="center" class="separator">[b]Action[/b]</td>
        </tr>'
;

    
$avno=0
    if (
USE_ENGINE=="1") {
        if (
TYPE == 'all') {
            
$fp fopen(FILE_NAME_SERVERS,"r");
            while (!
feof ($fp)) {
                
$data fgets($fp4096);
                if (!
eregi('##',$data)) {
                    list(
$tld$include$server$nomatch$link) = explode("|",$data);
                    if (
$include=="1" and $tld!="name") {
                        
$ddomain eregi_replace(" ","",DDOMAIN);
                        
$domname $ddomain.".".$tld;
                        
$domname2 escapeshellcmd ($domname).".";
                        if (
checkdnsrr($domname2.".","NS")==false// check if there is a nameserver assigned to a domain
                        
{
                            if(
USE_EXTRACHECK)
                            {
                                
$extrano extracheck($domname,$server,$nomatch);
                                if (
$extrano=="1") {
                                    
dispav($domname,$link,$ddomain,$tld,0);
                                    
$avno=1;
                                } else {
                                    
dispun($domname,$server);
                                }
                            } else {
                                
dispav($domname,$link,$ddomain,$tld,0);
                                
$avno=1;
                            }
                        } else {
                            if(
USE_CNAMECHECK)
                            {
                                
// check if the domain is a canonical name
                                
if (checkdnsrr($domname2.".","CNAME")==true)
                                {
                                    
dispav($domname,$link,$ddomain,$tld,1);
                                    
$avno=1;
                                } else {
                                    
dispun($domname,$server);
                                }
                            } else {
                                
dispun($domname,$server);
                            }
                        }
                    }
                    else if (
$include=="1" and $tld=="name") {
                        echo 
"<tr><td colspan=3 align=center><font size=-2>".NAME_WARNING."</font></td></tr>";
                    }
                }
            }
            
fclose($fp);
        } else {
            
$fp fopen(FILE_NAME_SERVERS,"r");
            while (!
feof ($fp)) {
                
$data fgets($fp4096);
                if (!
eregi('##',$data)) {
                    list(
$tld$include$server$nomatch$link) = explode("|",$data);
                    if (
$tld==TYPE) {
                        
$ddomain eregi_replace(" ","",DDOMAIN);
                        
$domname $ddomain.".".$tld;
                        
$domname2 escapeshellcmd ($domname).".";
                        if (
checkdnsrr($domname2.".","NS")==false)
                        {
                            if (
USE_EXTRACHECK)
                            {
                                
$extrano extracheck($domname,$server,$nomatch);
                                if (
$extrano=="1") {
                                    
dispav($domname,$link,$ddomain,$tld,0);
                                    
$avno=1;
                                } else {
                                    
dispun($domname,$server);
                                }
                            } else {
                                
dispav($domname,$link,$ddomain,$tld,0);
                                
$avno=1;
                            }
                        } else {
                            if (
USE_CNAMECHECK)
                            {
                            
// check if the domain is a canonical name
                                
if (checkdnsrr($domname2.".","CNAME")==true)
                                {
                                    
dispav($domname,$link,$ddomain,$tld,1);
                                    
$avno=1;
                                } else {
                                    
dispun($domname,$server);
                                }
                            } else {
                                
dispun($domname,$server);
                            }
                        }
                    }
                }
            }
            
fclose($fp);
        }
segue il resto