Visualizzazione dei risultati da 1 a 4 su 4
  1. #1
    Utente di HTML.it
    Registrato dal
    May 2007
    Messaggi
    1,802

    capire qual e la variabile

    ragazzi ciao avrei bisogno un vostro aiuto vi spiego io dovrei trovare di uno script per la ricerca dei nomi a dominio la variabile che da il risultato disponibile e non disponibile la frase disponibile e una costante
    Codice PHP:
    define('AVAILABLE_TEXT',            'Disponibile');                        // Text displayed if the domain is available
            
    define('NOT_AVAILABLE_TEXT',        'Non disponibile');                            // Text displayed if the domain is not available 
    inoltre lo script a la possibilita di essere inpostato in tre maniere io sto usando la terza

    Codice PHP:
        include_once ("mrwhois_config.php");
        include_once (FILE_NAME_LANGUAGE);
    ?>
    <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>


    <?
    posto il seguito nel altra risposta

  2. #2
    Utente di HTML.it
    Registrato dal
    May 2007
    Messaggi
    1,802
    Codice 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>

  3. #3
    Utente di HTML.it
    Registrato dal
    May 2007
    Messaggi
    1,802
    Codice PHP:
    <?
        
    }

        
    // 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);
            }


        
    // using nslookup command
        
        
    } else if (USE_ENGINE=="2") {

            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);
                            
    $result ""$outputstring "";
                            
    $command2 "nslookup -type=ns $domname2";
                            
    exec ($command2,$result);
                            
    $outputno count($result);
                            for (
    $ino=0;$ino<=$outputno;$ino++) { $outputstring .= $result[$ino]; }
                            if (!
    eregi("nameserver",$outputstring)) { 
                                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
                                    
    $command3 "nslookup -type=cname $domname2";
                                    
    exec ($command3,$result3);
                                    
    $outputno3 count($result3);
                                    for (
    $ino3=0;$ino3<=$outputno3;$ino3++) { $outputstring3 .= $result3[$ino3]; }
                                    if (!
    eregi("canonical",$outputstring3)) { 
                                        
    dispun($domname,$server);
                                    } else {
                                        
    dispav($domname,$link,$ddomain,$tld,1);
                                        
    $avno=1;
                                    }
                                } 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);
                            
    $result ""$outputstring "";
                            
    $command2 "nslookup -type=ns $domname2";
                            
    exec ($command2,$result);
                            
    $outputno count($result);
                            for (
    $ino=0;$ino<=$outputno;$ino++) { $outputstring .= $result[$ino]; }
                            if (!
    eregi("nameserver",$outputstring)) {
                                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
                                    
    $command3 "nslookup -type=cname $domname2";
                                    
    exec ($command3,$result3);
                                    
    $outputno3 count($result3);
                                    for (
    $ino3=0;$ino3<=$outputno3;$ino3++) { $outputstring3 .= $result3[$ino3]; }
                                    if (!
    eregi("canonical",$outputstring3)) { 
                                        
    dispun($domname,$server);
                                    } else {
                                        
    dispav($domname,$link,$ddomain,$tld,1);
                                        
    $avno=1;
                                    }
                                } else {
                                    
    dispun($domname,$server);
                                }
                            }
                        }
                    }
                }
                
    fclose($fp);
            }

        } else {


        
    // using engine "3" - fsockopen() function - slowest but most reliable

            
    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;
                            
    $result "";
                            
    $ns fsockopen($server,43); fputs($ns,"$domname\r\n");
                            while(!
    feof($ns)) $result .= fgets($ns,128); fclose($ns);
                            if (
    eregi($nomatch,$result)) { $avno=1dispav($domname,$link,$ddomain,$tld,0); } 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;
                            
    $result "";
                            
    $ns fsockopen($server,43); fputs($ns,"$domname\r\n");
                            while(!
    feof($ns)) $result .= fgets($ns,128); fclose($ns);
                            if (
    eregi($nomatch,$result)) 
                            { 
    $avno=1dispav($domname,$link,$ddomain,$tld,0); } else { dispun($domname,$server); }
                        }
                    }
                }
                
    fclose($fp);
            }
        }
        if (
    PROCESSING_TYPE=="2" and $avno==1)
        {
            echo 
    '<tr><td colspan="3" align="right"><input type=submit value="'.BUTTON_NEXT.'"></td></tr>';
        }

        echo 
    '</table>';
        echo 
    '</td></tr></table></td></tr></table>';

        if (
    PROCESSING_TYPE=="2")
        {
            echo 
    '</form>';
        }


        if (
    WAIT_LAYER_ENABLED) { echo '<script language="javascript">hidelayer("waitlayer");</script>'; }

        
    // if logging enabled write info to the file
        
    if(WANTLOG)    {
            
    $remote_addr $REMOTE_ADDR;
            
    $today date("d-m-y H:i"time());
            if (
    file_exists(FILE_NAME_LOG) and is_writeable(FILE_NAME_LOG))    {
                
    $fp fopen(FILE_NAME_LOG,"a+");
                
    $infolog "Date: $today | IP: $remote_addr | ".DDOMAIN."\n";
                
    fputs($fp$infolog);
                
    fclose($fp);
            }
        }
        if (
    REPEAT_SEARCH_WINDOW)
        {
            include_once(
    FILE_NAME);
        }
        if (
    DISPLAY_RESULT_FOOTER) include_once(FILE_NAME_FOOTER);
        echo 
    "&dom= $domname"//non toccare

        
    echo "&dom2= $domname2"//non toccare

        
    echo"&result= $result"//non toccare
        
    echo"&mess= $what $whare";

        
    ?>

  4. #4
    Utente di HTML.it
    Registrato dal
    May 2007
    Messaggi
    1,802
    mi date una mano perfavore

Permessi di invio

  • Non puoi inserire discussioni
  • Non puoi inserire repliche
  • Non puoi inserire allegati
  • Non puoi modificare i tuoi messaggi
  •  
Powered by vBulletin® Version 4.2.1
Copyright © 2025 vBulletin Solutions, Inc. All rights reserved.