Results 1 to 13 of 13

Thread: c0d

  1. #1

    Thread Starter
    Retired G&G Mod NoteMe's Avatar
    Join Date
    Oct 2002
    Location
    @ Opera Software
    Posts
    10,190

    c0d

    Where is my c0d

  2. #2
    PoorPoster iPrank's Avatar
    Join Date
    Oct 2005
    Location
    In a black hole
    Posts
    2,729

    Re: c0d

    Usefull VBF Threads/Posts I Found . My flickr page .
    "I love being married. It's so great to find that one special person you want to annoy for the rest of your life." - Rita Rudner


  3. #3
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170

  4. #4

    Thread Starter
    Retired G&G Mod NoteMe's Avatar
    Join Date
    Oct 2002
    Location
    @ Opera Software
    Posts
    10,190

    Re: c0d

    You are all giving me bad c0d..

  5. #5
    Fanatic Member namrekka's Avatar
    Join Date
    Feb 2005
    Location
    Netherlands
    Posts
    639

    Re: c0d

    Okay, sorry. Here is your cod:
    Attached Images Attached Images  

  6. #6

    Thread Starter
    Retired G&G Mod NoteMe's Avatar
    Join Date
    Oct 2002
    Location
    @ Opera Software
    Posts
    10,190

    Re: c0d

    Compile error again. I give up. Give me the right font, and do it in PHP for me please.

  7. #7
    PoorPoster iPrank's Avatar
    Join Date
    Oct 2005
    Location
    In a black hole
    Posts
    2,729

    Re: c0d

    PHP Code:
    <?php

    /**********************************************************************************
    ****** class name : funny_strings                                                             
    ****** language   : php                                                                                      
    ****** author     : Martin Lacher                                                                            
    ****** contact    : m|a|r|t|i|n dot l|a|c|h|e|r at w|e|b dot d|e                                                  
    ****** version    : 1.0                                                                           
    ****** date       : 13/11/2004
    ****** licence    : gnu-gpl
    ******
    ****** Free for private use, for commercial use contact the author.
    ******
    **********************************************************************************/

    /**********************************************************************************
    ******  Transforms text into h4xx0r- or eLiTe-StYlE or shlefufs Wdors
    **********************************************************************************/

    /**********************************************************************************
    ******  List of public funtions:
    ******    - bool set_separator_read(string character)
    ******    - bool set_separator_write(string character)
    ******    - bool set_elite_init(int init)
    ******
    ******    - string elite(string text)
    ******    - string half_elite(string text)
    ******    - string h4xx0r(string text)
    ******    - string shuffle_word(string word)
    ******    - string shuffle_text(string text)
    ******
    **********************************************************************************/

    class funny_string
    {

        var 
    $separator_read ' ';
        var 
    $separator_write ' ';
        var 
    $elite_init 0;
        
        
    /*************************************************************************
        *****  The read_separator will be used, when a text is separeted    ******
        *****  into words. It indicates where one word ends and where the   ******
        *****  next one starts. It is only one character.                   ******
        **************************************************************************/
        
        
    function set_separator_read($c) {
            
            if(
    strlen(trim($c))>1) return false;
            else {
                
    $this->separator_read $c;
                return 
    true;
            }
        }
        
        
    /*************************************************************************
        *****  The write_separator will be used, when a text is joined      ******
        *****  after being shuffled. It is set between the words. It is     ******
        *****  only one character.                                          ******
        **************************************************************************/
        
        
    function set_separator_write($c) {
            
            if(
    strlen(trim($c))>1) return false;
            else {
                
    $this->separator_write $c;
                return 
    true;
            }
        }
            
        
    /*************************************************************************
        *****  This function set a initial number for elite transformation  ******
        *****  It accepts all kinds of ints an floats, but reduces them to  ******
        *****  0 or 1.                                                      ******
        **************************************************************************/
        
        
    function set_elite_init($i) {
            
            
    $i floor(abs($i 2));
            
    $this->elite_init $i;
        }
        
        
    /*************************************************************************
        *****  This Function checks only whether a character is a letter   *******
        *****  or not. used in shuffle_word().                             *******
        **************************************************************************/
        
        
    function chr_check($c) {
        
            
    $oc ord($c);
            if (
    $oc >= 65 && $oc <= 90) return true;
            elseif (
    $oc >= 97 && $oc <= 122) return true;
            else return 
    false;
        }
        
        
        
    /*************************************************************************
        *****  This function changes the case of a single character         ******
        **************************************************************************/
        
        
    function change_case($c) {
        
            
    $oc ord($c);
            if (
    $oc >= 65 && $oc <= 90) return chr($oc+32);
            elseif (
    $oc >= 97 && $oc <= 122) return chr($oc-32);
            else return 
    $c;
        }
        
        
    /*************************************************************************
        *****  This function transforms a text into h4xx0r-5ty|3            ******
        **************************************************************************/

        
    function h4xx0r($s) {
        
            
    $replacements = array("A" => "4""l" => "|""H" => "|-|",
                        
    "C" => "(""e" => "3""o" => "0",
                        
    "O" => "0""G" => "6""g" => "6",
                        
    "i" => "1""S" => "5""N" => "/\/",
                        
    "w" => "vv","B" => "8""V" => "\/",
                        
    "s" => "5""f" => "ph" );
            
            
    $s =strtr($s$replacements);
            return 
    $s;
        }
        
        
    /*************************************************************************
        *****  This function transforms a text into eLiTe-StYlE             ******
        **************************************************************************/
        
        
    function elite($s) {
        
            
    $s1 "";
            for(
    $i=0$i<strlen($s); $i++) {
                if(
    $i == $this->elite_init)    $s1 .= $s[$i];
                else 
    $s1 .= $this->change_case($s[$i]);
            }
            return 
    $s1;
        }
        
        
    /*************************************************************************
        *****  This function transforms a text into HALF elite STYLE        ******
        **************************************************************************/
        
        
    function half_elite($s) {
        
            
    $wds explode($this->separator_read$s);
            
    $wds2 = array();
            
            
    $i 0;
            foreach(
    $wds as $w) {
                if(
    $i == $this->elite_init$w2 strtoupper($w);
                else 
    $w2 strtolower($w);
                
    $wds2[] = $w2;
                
    $i++;
            }
            
            return 
    join($this->separator_write$wds2);
        }
        
        
    /*************************************************************************
        *****  This function shuffles one single word.                      ******
        **************************************************************************/
        
        
    function shuffle_word($w) {
        
                
    $w explode($this->separator_readtrim($w));
                
    $w $w[0];
                            
                
    $first "";
                
    $middle "";
                
    $last "";
                        
                
    $first substr($w01);
                
    $fpos 0;
                while(!
    $this->chr_check($w[$fpos]) && $fpos strlen($w)) {
                    
    $fpos++;
                    
    $first .= $w[$fpos];
                }
                
                if(
    $fpos != strlen($w)) {    
                    
    $lpos strlen($w)-1;
                    if(
    $lpos $fpos) {
                        
    $last substr($w, -1);
                        while(!
    $this->chr_check($w[$lpos])  && $lpos >= && $lpos $fpos) {
                            
    $lpos--;
                            
    $last $w[$lpos] . $last;
                        }        
                    }
                    
    $middle str_shuffle(substr($wstrlen($first), strlen($w)-strlen($first)-strlen($last)));
                }
                return 
    $first.$middle.$last;
        }
            
        
    /*************************************************************************
        *****  This function shuffles a whole text.                         ******
        **************************************************************************/
        
        
    function shuffle_text($str)
        {
            
    $words explode($this->separator_read$str);        
            
    $shuffled = array();
            
            foreach(
    $words as $w) {
                
    $w $this->shuffle_word($w);    
                
    $shuffled[] = $w;
            }
        
            return 
    implode($this->separator_write$shuffled);    
        }
    }

    ?>
    Usefull VBF Threads/Posts I Found . My flickr page .
    "I love being married. It's so great to find that one special person you want to annoy for the rest of your life." - Rita Rudner


  8. #8

    Thread Starter
    Retired G&G Mod NoteMe's Avatar
    Join Date
    Oct 2002
    Location
    @ Opera Software
    Posts
    10,190

    Re: c0d

    Too much c0d. Isn't there a simpler way of doing it?

  9. #9
    PoorPoster iPrank's Avatar
    Join Date
    Oct 2005
    Location
    In a black hole
    Posts
    2,729

    Re: c0d

    Use VB.
    Usefull VBF Threads/Posts I Found . My flickr page .
    "I love being married. It's so great to find that one special person you want to annoy for the rest of your life." - Rita Rudner


  10. #10

    Thread Starter
    Retired G&G Mod NoteMe's Avatar
    Join Date
    Oct 2002
    Location
    @ Opera Software
    Posts
    10,190

    Re: c0d

    Where can I download it?

  11. #11
    I'm about to be a PowerPoster!
    Join Date
    Jan 2005
    Location
    Everywhere
    Posts
    13,647

    Re: c0d

    Quote Originally Posted by iPrank
    Use VB.
    VB stinks at string manipulation.

    So does that PHP c0d.

  12. #12
    PoorPoster iPrank's Avatar
    Join Date
    Oct 2005
    Location
    In a black hole
    Posts
    2,729

    Re: c0d

    I'll mail it to you for free.
    Just give me $1000 S&H charge.
    Usefull VBF Threads/Posts I Found . My flickr page .
    "I love being married. It's so great to find that one special person you want to annoy for the rest of your life." - Rita Rudner


  13. #13

    Thread Starter
    Retired G&G Mod NoteMe's Avatar
    Join Date
    Oct 2002
    Location
    @ Opera Software
    Posts
    10,190

    Re: c0d

    Quote Originally Posted by penagate
    VB stinks at string manipulation.

    So does that PHP c0d.

    I'll go for EL then...

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width