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

    invio dati da flash a php

    ragazzi avrei un problema innanzi tutto scusate comunque avrei questo problema che devo sistemare io nel sito in flash ho caricato un whois quindi un testo d input un conbo e un pulsante adesso il porblema e che flash invia qual cosa al php e facendo il controllo fa aprire una paggina in html dove c e il risultato soltanto che il risultato e niente secondo me flash non trasmette bene gli input al php comunque io metto il tutorial del whois che sarebbe fla e php e html

    scarica tutorial


    inoltre qui scrivo l actionscript
    combo
    products_cb.dataProvider = ["eu", "it","com","net","org","biz","info","mobi","de","f r","ua","com.ua","ru","tv"];

    e normale action che invia i dati al php

    Codice PHP:
    puls_cbt.onRelease = function() {
         var 
    send_lv:LoadVars = new LoadVars ();  
         if (
    domain_cti.text == "") {
            
    message_txt.textColor 0xff0000;
            
    message_txt.text "Campo obligatorio!";
            
    setTimeout(cancella1000);
            return;
        }
        function 
    cancella() {
            
    message_txt.text "";
        
      } 
    variabile.send_lv .domain_ctidomain .text;
    variabile.send_lv.products_cb ext.selectedItem.data;
    send_lv.send("topdog_whois.php","GET");
    };
    stop(); 
    seguo con il php

  2. #2
    Utente di HTML.it
    Registrato dal
    May 2007
    Messaggi
    1,805
    Codice PHP:
    <?php
            
    ***********/
    $template "temp.html";           //this is the page where the results will be displayed
                                        //this page must contain this ""
                                        //where ever you want the results to be displayed

    $registerlink "signup.php";       //this is the page a user is taken to if they want to
                                        //register the domain name from you or your affiliate
                                        //it should be a script preferably because this script
                                        //will pass it the $domain variable using the get method
                                        //for example signup.php?domain=topdog-software.com
                                        
    $restrict 0;                      //set to 0 if you don't want to restrict access
                                        //set to 1 if you want to restrict access remember to
                                        //change $REFERERS below to reflect your site.

    $REFERERS = array('topdog-software.com''www.topdog-software.com');
                                        
    //These are the domains allowed to access the script
                                        //if you decide to restrict access
    error_reporting(0);
    /************************    END CUSTOMISATIONS    ************************************/

    /************************    SERVER DEFINITIONS    ************************************/
    $serverdefs= array(

                             
                              
                                                 
                            
                            
    "eu" => array("whois.eu","No match"),
                            
    "it" => array("whois.nic.it","No match"),
                            
    "com" => array("whois.crsnic.net","No match"),
                            
    "net" => array("rs.internic.net","No match"),
                            
    "tv" => array("rs.internic.net","No match"),
                            
    "com.au" => array("whois.ausregistry.net.au","No data Found"),
                            
    "ca" => array("whois.cira.ca""AVAIL"),
                            
    "org.uk" => array("whois.nic.uk","No match"),
                            
    "name" => array("whois.nic.name","No match"),
                            
    "us" => array("whois.nic.us","Not Found"),
                            
    "ws" => array("whois.website.ws","No Match"),
                            
    "be" => array("whois.ripe.net","No entries"),
                            
    "com.cn" => array("registry.nl","is free"),
                            
    "pl" => array("whois.dns.pl","No information about"),
                            
    "pt" => array("whois.ripe.net","No entries found")


                        );
    /***********************     END SERVER DEFINITIONS    *********************************/


    if ($_SERVER['REQUEST_METHOD'] == 'GET'){
        
    $domain $_GET['domain'];
        
    $ext $_GET['ext'];
        
    $option $_GET['option'];
    }else{
        
    $domain $_POST['domain'];
        
    $ext $_POST['ext'];
        
    $option $_POST['option'];
    }

    if(
    $restrict ==1){
        
    check_referer();
    }
    /*************     Perform checks domain x-ters            *************************************/
    namecheck($domain);

    /*************        Check domain zone                    ************************************/
        
    if ($serverdefs[$ext]){
            
    $server $serverdefs[$ext][0];
            
    $nomatch $serverdefs[$ext][1];
            if(
    $option=="check")
            {
                
    $layout check_domain($domain,$ext);
                
    print_results($layout);
            }
            if(
    $option=="whois")
            {
                
    whois($domain,$ext);
            }
        }
        elseif(
    $ext == "co.za"){
            if(
    $option == "check"){
               if(
    function_exists(curl_init)){
                        
    $layout cozacurlcheck($domain);
                }else{
                        
    $layout cozacheck($domain);
                }
                
    print_results($layout);
            }elseif(
    $option=="whois"){
                if(
    function_exists(curl_init)){
                    
    cozacurlwhois($domain);
                }else{
                    
    cozawhois($domain);
                }
            }
        }
        elseif(
    $ext == "all"){
            
    $layout "<tr>\n<td>\n<table width=\"100%\" border=\"0\" cellPadding=2 class=font1l>\n";
            foreach(
    $serverdefs as $ext => $servers)
            {
                
    $server $servers[0];
                
    $nomatch $servers[1];
                
    $available check_domain($domain$ext);
                if (
    $available == 0)
                {
                    
    $layout .= sprintf("<tr>\n<td>\n%s.%s</td>\n<td>\n<font color=\"green\">\n[b]Available![/b]\n</font>\n</td>\n"$domain$ext);
                    
    $layout .= sprintf("<td>\n<a href=\"%s?domain=%s.%s\">register now</a>\n</td>\n</tr>\n"$registerlink$domain$ext);
                }
                elseif (
    $available == 2)
                {
                    
    $layout .= sprintf("<tr>\n<td>\n%s.%s</td>\n<td>\n<font color=\"grey\">\nUnknown</font>\n</td>\n"$domain$ext);
                    
    $layout .= "<td>\nCould not contact server</td>\n</tr>\n";
                }
                else
                {
                    
    $layout .= sprintf("\n<tr>\n<td>\n%s.%s</td>\n<td>\n<font color=\"red\">Taken\n</font>\n</td>\n"$domain$ext);
                   
    $layout .= sprintf("<td>\n<a href=\"%s?domain=%s&ext=%s&option=whois\">check whois</a></td>\n</tr>\n"$PHP_SELF$domain$ext);
               }
            }
            
    $layout .= "</table>\n</td>\n</tr>\n";
            
    $ext " all supported domains";
            
    print_results($layout);
        }

    /**    <------------------------------------functions--------------------------------> **/
    function check_domain($domain,$ext)
    {
        global 
    $nomatch,$server;
        
    $output="";
        if((
    $sc fsockopen($server,43))==false){return 2;}
        
    fputs($sc,"$domain.$ext\n");
        while(!
    feof($sc)){$output.=fgets($sc,128);}
        
    fclose($sc);
        
    //compare what has been returned by the server
        
    if (eregi($nomatch,$output)){
            return 
    0;
        }else{
            return 
    1;
        }
    }

    /*********        Function to return whois results        ***********************************/
    function whois($domain,$ext)
    {   global 
    $template,$server;
        if((
    $sc fsockopen($server,43))==false){
            if((
    $sc fsockopen($server,43))==false){
                
    //echo"There is a temporary service disruption Please again try later";
                
    $layout =2;
                
    print_results($layout);
                exit;
            }
        }
        if(
    $ext=="com"||$ext=="net"){
            
    //
            
    fputs($sc"$domain.$ext\n");
            while(!
    feof($sc)){
                
    $temp fgets($sc,128);
                if(
    ereg("Whois Server:"$temp)) {
                    
    $server str_replace("Whois Server: """$temp);
                    
    $server trim($server);
                }
            }
            
    fclose($sc);
            if((
    $sc fsockopen($server,43))==false){
                
    //echo"There is a temporary service disruption Please try later";
                
    $layout =2;
                
    print_results($layout);
                exit;
            }
        }

        
    $output="";
        
    fputs($sc,"$domain.$ext\n");
        while(!
    feof($sc)){$output.=fgets($sc,128);}
        
    fclose($sc);
        
    //print
        
    print_whois($output);
        

    }
    /*******        function to check referer    ************************************************/
    function check_referer () {
        global 
    $REFERERS$HTTP_REFERER;
        if (
    $HTTP_REFERER != "")
            while (list(
    $val$ref) = each($REFERERS))
            if (
    preg_match("/^http:\/\/$ref/"$HTTP_REFERER))
            return;
            
    $layout "<tr>\n<td>\n<font color=\"red\">\nAccess denied to: $HTTP_REFERER</font>\n
    \nPlease dont link to this script <a href=\"http://www.topdog-software.com/scripts.php\">download</a> a copy
            and set it up on your site.
    \n This is due to bandwidth usage ... leeching and Data mining</td>\n</tr>\n"
    ;
          
    print_results($layout);
          exit;
    }
    /*******        Function to print the results into your template    ************************/
    function print_results($layout)
    {
        global 
    $template,$registerlink,$domain,$ext,$server;
        if(!
    is_file($template)){
            print
    "The template file into which to print the results either does not exist or is
            not writeable

            please correct this if you are the webmaster of this site

            The script can not continue exiting......"
    ;
            exit;
        }
        
    $template file ($template);
        
    $numtlines count ($template);    //Number of lines in the template
        
    $line 0;
        while (! 
    stristr ($template[$line], "") && $line $numtlines) {
        echo 
    $template[$line];
        
    $line++;
        }
        if(
    $layout=="0"){
            
    $line++;
                print   
    "\n<!-----------------\n";
                print    
    "\tPOWERED BY\n\n";
                print    
    "\tTOPDOG WHOIS & DOMAIN CHECK SCRIPT\n";
                print   
    "\t&copy; KISSA ANDREW COLIN\n";
                print    
    "\tkissandrew@yahoo.com\n";
                print    
    "\twww.topdog-software.com\n";
                print    
    "\n------------------->\n";
                print   
    "<table width=\"100%\" border=\"0\" cellPadding=2 class=font1l>";
                print   
    "<tr><td>[b]Domain query Results for \"$domain.$ext\"[/b]</td></tr>";
                print   
    "<tr><td><hr></td></tr>";
                print   
    "<tr><td>The domain is available <a href=\"$registerlink?domain=$domain.$ext\">register</a> it now</td></tr>";
                print   
    "</table>";
        }
        elseif(
    $layout=="1"){
            
    $line++;
                print   
    "\n<!-----------------\n";
                print    
    "\tPOWERED BY\n\n";
                print    
    "\tTOPDOG WHOIS & DOMAIN CHECK SCRIPT\n";
                print   
    "\t&copy; KISSA ANDREW COLIN\n";
                print    
    "\tkissandrew@yahoo.com\n";
                print    
    "\twww.topdog-software.com\n";
                print    
    "\n------------------->\n";
                print   
    "<table width=\"100%\" border=\"0\" cellPadding=2 class=font1l>\n";
                print     
    "<tr>\n<td>\n[b]\nDomain query Results for \"$domain.$ext\"[/b]\n
    \n</td>\n</tr>\n"
    ;
                print   
    "<tr>\n<td>\n<hr>\n</td>\n</tr>\n";
                print   
    "<tr>\n<td>\n[b]\nThe domain is already taken <a href=\"$PHP_SELF?domain=$domain&ext=$ext&option=whois\">Check</a> the whois information
    </td></tr>"
    ;
                print   
    "<tr>\n<td>\nCheck another domain name <a href=\"javascript:history.back()\">here</a></td></tr>";
                print   
    "</table>\n";
        }
         elseif(
    $layout=="2"){
            
    $line++;
            print   
    "\n<!-----------------\n";
              print    
    "\tPOWERED BY\n\n";
              print    
    "\tTOPDOG WHOIS & DOMAIN CHECK SCRIPT\n";
              print   
    "\t&copy; KISSA ANDREW COLIN\n";
              print    
    "\tkissandrew@yahoo.com\n";
              print    
    "\twww.topdog-software.com\n";
              print    
    "\n------------------->\n";
            print   
    "<table width=\"100%\" border=\"0\" cellPadding=2 class=font1l>\n";
            print     
    "<tr>\n<td>\n[b]\nDomain query Results for \"$domain.$ext\"[/b]\n
    \n</td>\n</tr>\n"
    ;
            print   
    "<tr>\n<td>\n<hr>\n</td>\n</tr>\n";
            print   
    "<tr>\n<td>\n[b]Could not contact the whois server $server[/b]\n
    \n</td>\n</tr>\n"
    ;
            print   
    "<tr>\n<td>\nCheck another domain name <a href=\"javascript:history.back()\">here</a>\n</td>\n</tr>\n";
            print   
    "</table>\n";
        }
        else{
              
    $line++;
            print   
    "<table width=\"100%\" border=\"0\" cellPadding=2 class=font1l>\n";
            print     
    "<tr>\n<td>\n[b]Domain query Results for \"$domain.$ext\"[/b]\n
    \n</td>\n</tr>\n"
    ;
            print   
    "<tr>\n<td>\n<hr>\n</td>\n</tr>\n";
            print     
    $layout;
            print   
    "<tr>\n<td>\nCheck another domain name <a href=\"javascript:history.back()\">here</a>\n</td>\n</tr>\n";
            print   
    "</table>\n";
        }
        print 
    "
    \n
    \n"
    ;
        print 
    "<center>\n<font class=font1csm>\n powered by <a href=\"http://www.marikweb.com\">marikweb</a>\n</font>\n</center>\n";
        while (
    $line $numtlines) {
         echo 
    $template[$line];
         
    $line++;
       }
    }

    /*******        Function to print whois results    *****************************************/
    function print_whois($output){
        global 
    $template,$domain,$ext;
        if(!
    is_file($template)){
            print
    "The template file into which to print the results either does not exist
            or is not writable

            please correct this if you are the webmaster of this site

            The script can not continue exiting......"
    ;
            exit;
        }
        
    $template file ($template);
        
    $numtlines count ($template);
        
    $line 0;
        while (! 
    stristr ($template[$line], "") && $line $numtlines) {
        echo 
    $template[$line];
        
    $line++;
        }
        
    $line++;
         print   
    "\n<!-----------------\n";
         print    
    "\tPOWERED BY\n\n";
         print    
    "\tTOPDOG WHOIS & DOMAIN CHECK SCRIPT\n";
         print   
    "\t&copy; KISSA ANDREW COLIN\n";
         print    
    "\tkissandrew@yahoo.com\n";
         print    
    "\twww.topdog-software.com\n";
         print    
    "\n------------------->\n";
        print   
    "<table width=\"100%\" border=\"0\" cellPadding=2 class=font1l>\n";
        print   
    "<tr>\n<td>\n[b]\nDomain whois query information for \"$domain.$ext\"[/b]\n</td>\n</tr>\n";
        print   
    "<tr>\n<td>\n<hr>\n</td>\n</tr>\n";
        print   
    "<tr>\n<td>\n";
        
    $outputexplode("\n",$output);
        foreach (
    $output as $value){
                print 
    "$value
    \n"
    ;
        }
        print 
    "</td>\n</tr>\n</table>\n";
        print 
    "
    "
    ;
        print 
    "<center>\n<font class=font1csm>\n powered by <a href=\"http://www.topdog-software.com/scripts.php\">marikweb</a>\n</font>\n</center>\n";
        while (
    $line $numtlines) {
        echo 
    $template[$line];
        
    $line++;
       }

    }
    ?>

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.