Pagina 2 di 3 primaprima 1 2 3 ultimoultimo
Visualizzazione dei risultati da 11 a 20 su 22
  1. #11
    Utente bannato
    Registrato dal
    Apr 2004
    Messaggi
    1,392
    Sei uno sforna-classi (funzioni )!

    Grande!

  2. #12
    Moderatore di Server Apache L'avatar di marketto
    Registrato dal
    Sep 2001
    Messaggi
    5,858
    Originariamente inviato da PaTeR
    Sei uno sforna-classi!

    Grande!
    è una funzione...
    think simple think ringo

  3. #13
    Semplicemente spettacolare!!!!
    Come faccio però a visualizzare i risultati separati da una virgola, senza tutto l'ambaradan degli array?
    What is the |\/|atrix?

  4. #14
    Originariamente inviato da |\/|atrix
    Semplicemente spettacolare!!!!
    Come faccio però a visualizzare i risultati separati da una virgola, senza tutto l'ambaradan degli array?





    $combinazioni = &combinatoryDnk( 3, $chars );
    $output = '';
    for( $a = 0, $b = &count( $combinazioni ); $a < $b; $a++ ) {
    $output .= $combinazioni[$a].',';
    }
    echo substr( $output, 0, -1 );

    Formaldehyde a new Ajax PHP Zero Config Error Debugger

    WebReflection @WebReflection

  5. #15
    Grazie mille e scusate per il disturbo!!
    Ciao!
    What is the |\/|atrix?

  6. #16
    a titolo informativo, ecco una classe che fa tutti i tipi ( almeno credo ) di calcolo combinatorio

    http://andr3a.dotgeek.org/index.php?language=2&class=58

    Formaldehyde a new Ajax PHP Zero Config Error Debugger

    WebReflection @WebReflection

  7. #17
    Un'ultima cosa...
    Vorrei effettuare delle query "whois" in base ai nomi ricavati dalla funzione... ho questo codice ma non mi va.. dov'è l'errore?
    codice:
    <?php
    
    function whois($domain, $server="whois.nic.it") {
    $fp = fsockopen ($server, 43, &$errnr, &$errstr) or die("$errno: $errstr");
    fputs($fp, "$domain\n");
    $myvar = '';
    while (!feof($fp))
    $myvar .= fgets($fp, 2048);
    fclose($fp);
    return $myvar;
    }
    
    $container = Array( 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'i', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'z' ); 
    
    function combinatoryDnk( $match, $container ) {
    
    	$__loop = '';
    	$__returnedValue = '';
    	$__limit = &count( $container );
    	$__myMatches = Array();
    	for( $a = 0; $a < $match; $a++ ) {
    		$__loop .= 'for( $_'.$a.' = 0; $_'.$a.' < '.$__limit.'; $_'.$a.'++ ) { ';
    		$__returnedValue .= '$container[$_'.$a.'].';
    	}
    	$__loop .= 'array_push( $__myMatches, '.substr( $__returnedValue, 0, -1 ).' );';
    	for( $a = 0; $a < $match; $a++ ) {
    		$__loop .= ' }';
    	}
    	eval( $__loop );
    	return $__myMatches;
    }
    
    $combinazioni = combinatoryDnk( 3, $container ); 
    $output = ''; 
    for( $a = 0, $b = &count( $combinazioni ); $a < $b; $a++ ) { 
    
    $output .= $combinazioni[$a]; 
     
    }
    
    $domain = substr( $output, 0, -1 );
    
    $server = "whois.nic.it";
    $regex = "/No entries found in the IT-NIC database./";
    
    $myvar = (whois($domain, $server));
    if (preg_match($regex, $myvar))
    echo "Il dominio ".$domain." è disponibile";
    else
    echo "Il dominio ".$domain." non è disponibile";
    
    
    
    
    
    ?>
    Grazie
    What is the |\/|atrix?

  8. #18
    Ho provato anche così ma niente da fare:
    codice:
    <?php
    
    $server = "whois.nic.it";
    $regex = "/No entries found in the IT-NIC database./";
    
    function whois($domain, $server="whois.nic.it") {
    $fp = fsockopen ($server, 43, &$errnr, &$errstr) or die("$errno: $errstr");
    fputs($fp, "$domain\n");
    $myvar = '';
    while (!feof($fp))
    $myvar .= fgets($fp, 2048);
    fclose($fp);
    return $myvar;
    }
    
    $container = Array( 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'i', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'z' ); 
    
    function combinatoryDnk( $match, $container ) {
    
    	$__loop = '';
    	$__returnedValue = '';
    	$__limit = &count( $container );
    	$__myMatches = Array();
    	for( $a = 0; $a < $match; $a++ ) {
    		$__loop .= 'for( $_'.$a.' = 0; $_'.$a.' < '.$__limit.'; $_'.$a.'++ ) { ';
    		$__returnedValue .= '$container[$_'.$a.'].';
    	}
    	$__loop .= 'array_push( $__myMatches, '.substr( $__returnedValue, 0, -1 ).' );';
    	for( $a = 0; $a < $match; $a++ ) {
    		$__loop .= ' }';
    	}
    	eval( $__loop );
    	return $__myMatches;
    }
    
    $combinazioni = combinatoryDnk( 3, $container ); 
    $domain = ''; 
    for( $a = 0, $b = &count( $combinazioni ); $a < $b; $a++ ) { 
    
    $domain = $combinazioni[$a]; 
    
    $myvar = (whois($domain, $server));
    if (preg_match($regex, $myvar))
    echo "Il dominio ".$domain." è disponibile
    ";
    else
    echo "Il dominio ".$domain." non è disponibile
    ";
     
    }
    
    ?>
    What is the |\/|atrix?

  9. #19
    nessuna idea?
    What is the |\/|atrix?

  10. #20
    up..
    What is the |\/|atrix?

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.