My signature - the PHP code

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • fitnessphotos
    Confirmed User
    • Dec 2002
    • 109

    #1

    My signature - the PHP code

    Okay folks, alot of people asked; so here it is. This is the hahahahahaha I use to generate my signature.

    You can insert this as an image one of two ways:

    - img src the hahahahahaha itself - it returns a PNG
    - htaccess a redirect so that it points to the php file (but to a browser looks like a JPG or PNG file)

    Enjoy!


    hmmm.... doesnt seem to want to print correctly.
    SIG TOO BIG! Maximum 120x60 button and no more than 3 text lines of DEFAULT SIZE and COLOR. Unless your sig is for a GFY top banner sponsor, then you may use a 624x80 instead of a 120x60.
  • Lane
    Will code for food...
    • Apr 2001
    • 8496

    #2
    Originally posted by fitnessphotos
    Okay folks, alot of people asked; so here it is. This is the hahahahahaha I use to generate my signature.

    You can insert this as an image one of two ways:

    - img src the hahahahahaha itself - it returns a PNG
    - htaccess a redirect so that it points to the php file (but to a browser looks like a JPG or PNG file)

    Enjoy!


    hmmm.... doesnt seem to want to print correctly.
    does this hahahahahaha and hahahahahaha? is it just me or the hahahahahaha doesnt hahahahahaha?

    Comment

    • fitnessphotos
      Confirmed User
      • Dec 2002
      • 109

      #3
      Well, for some reason the CODE tag wont print the code properly; it keeps cutting off the top part of the hahahahahaha.
      SIG TOO BIG! Maximum 120x60 button and no more than 3 text lines of DEFAULT SIZE and COLOR. Unless your sig is for a GFY top banner sponsor, then you may use a 624x80 instead of a 120x60.

      Comment

      • KnightMare
        So Fucking Banned
        • Nov 2002
        • 281

        #4
        Just tell people to QUOTE you, to get the code.

        Comment

        • fitnessphotos
          Confirmed User
          • Dec 2002
          • 109

          #5
          The words censor sucks ass.
          SIG TOO BIG! Maximum 120x60 button and no more than 3 text lines of DEFAULT SIZE and COLOR. Unless your sig is for a GFY top banner sponsor, then you may use a 624x80 instead of a 120x60.

          Comment

          • fitnessphotos
            Confirmed User
            • Dec 2002
            • 109

            #6
            Code:
            <?
            header("Content-Type: image/png");
            
            function ImageStringAlignAndWrap($image, $font, $text, $color, $maxwidth) {
                global $lines;
                
                $fontwidth=6;
                
                if ($maxwidth != NULL) {
                    $maxcharsperline = floor($maxwidth / $fontwidth);
                    $text = wordwrap($text, $maxcharsperline, "\n", 1);
                }
               
                $lines = explode("\n", $text);
            }
            
            if (isset($_SERVER['REMOTE_ADDR'])) {
               $ip = $_SERVER['REMOTE_ADDR'];
            }
            elseif (isset($_SERVER['HTTP_X_FORWARDED_FOR'])) {
               $ip = $_SERVER['HTTP_X_FORWARDED_FOR'];
            }
            elseif (isset($_SERVER['HTTP_VIA'])) {
               $ip = $_SERVER['HTTP_VIA'];
            } 
            else {
               $ip = "unknown";
            }
            
            
            if ($ip hahahaha "unknown") {
                $hst = "";
            }
            else {
                $hst = @gethostbyaddr($ip);
                $ispstr = explode( ".", $hst );
                $numele = count( $ispstr );
                $isp = "";
                if ( $numele > 2 ) {
                    $isp = " Your ISP is " . $ispstr[$numele-2] . "." . $ispstr[$numele-1];
                    $isp .= "!";
                }
                
                if ( strstr($isp, "aol.com") ) $isp .= " (AOL sucks!)";
                elseif ( strstr($isp, "msn.net") ) $isp .= " (Butterflies are ghey!)";
            }
            
            $agent = $HTTP_USER_AGENT;
            
            if ( strstr($agent, "Mac") ) $os = "You are running on a Mac";
            elseif ( strstr($agent, "Win98") ) $os = "You are running on Windows 98";
            elseif ( strstr($agent, "NT 4") ) $os = "You are running on Windows NT";
            elseif ( strstr($agent, "NT 5.0") ) $os = "You are running on Windows 2000";
            elseif ( strstr($agent, "NT 5.1") ) $os = "You are running on Windows XP";
            elseif ( strstr($agent, "Win") ) $os = "You are running on Windows";
            elseif ( strstr($agent, "Linux") ) $os = "You are running on Linux";
            else $os = "";
            
            if ( strstr($agent, "MSIE 5") ) $browser = "using IE 5";
            elseif ( strstr($agent, "MSIE 6") ) $browser = "using IE 6";
            elseif ( strstr($agent, "MSIE 4") ) $browser = "using IE 4";
            elseif ( strstr($agent, "Mozilla/5") ) $browser = "using Mozilla/Netscape 5";
            elseif ( strstr($agent, "Mozilla/6") ) $browser = "using Netscape 6";
            elseif ( strstr($agent, "Mozilla/4") ) $browser = "using Netscape 4";
            elseif ( strstr($agent, "Chimera") ) $browser = "using Chimera";
            else $browser = "";
            
            if ( $os != "" && $browser != "" ) $browser = "\n$os and $browser!";
            elseif ( $os != "" ) $browser = "\nYou are $os!";
            
            $string = "You are $ip!$isp$browser";
            
            $matrix = array( 
            "There is no spoon.",
            "You have a problem with authority, Mr. Anderson.",
            "What is 'real'? How do you define 'real'?",
            "I know kung fu.",
            "No, I am a meat popsicle.",
            "So tell me my man, are you nervous in the service?",
            "And I have way too much free time on my hands.",
            "Spandex: it's a privilege, not a right.",
            "I don't play well with others.",
            );
            
            
            $rand_string = $matrix[rand(0,8)];
            $string .= "\n$rand_string";
            
            $fontfile = "TECHNICN.TTF";
            $fontsize = "10";
            $textangle = "0";
            
            ImageStringAlignAndWrap( $myimage, 3, $string, $black, 490 );
            $numlines = count($lines);
            
            $sigwidth = 1; $maxheight=1;
            while (list($numl, $line) = each($lines)) {
                list($pos_blx, $pos_bly, $pos_brx, $pos_bry, $pos_trx, $pos_try, $pos_tlx, $pos_tly) = imagettfbbox($fontsize, $textangle, $fontfile, $line);
                $textwidth = $pos_brx - $pos_blx;
                $textheight = $pos_bly - $pos_tly;
            
                if ( $textwidth > $sigwidth ) $sigwidth = $textwidth;
                if ( $textheight > $maxheight ) $maxheight = $textheight;
            }
            reset($lines);
            
            $sigheight = ($numlines * $maxheight) + ($numlines * 3) + 4;
            if ( $sigwidth < 50 ) $sigwidth = 50;
            
            $picwidth = $sigwidth+20;
            $picheight = $sigheight+44;
            $myimage = ImageCreate($picwidth, $picheight);
            
            $guy  = ImageCreateFromPng('toughguy.png');
            $top  = ImageCreateFromPng('top.png');
            $fill = ImageCreateFromPng('fill.png');
            
            $black = ImageColorAllocate($myimage, 0, 0, 0);
            $red   = ImageColorAllocate($myimage, 255, 0, 0);
            
            ImageFilledRectangle($myimage, 0, 0, $picwidth, 3, $red);
            ImageFilledRectangle($myimage, 0, ($sigheight + 8), $picwidth, $picheight, $red);
            ImageCopy( $myimage, $fill, 2, 6, 0, 0, ($sigwidth+16), $sigheight );
            ImageCopy( $myimage, $guy, floor($sigwidth/2), ($sigheight + 8), 0, 0, 33, 36 );
            ImageCopy( $myimage, $top, floor($sigwidth/2), 0, 0, 0, 38, 4 );
            ImageColorTransparent($myimage, $red);
            
            $y = 20;
            while (list($numl, $line) = each($lines)) {
                list($pos_blx, $pos_bly, $pos_brx, $pos_bry, $pos_trx, $pos_try, $pos_tlx, $pos_tly) = imagettfbbox($fontsize, $textangle, $fontfile, $line);
                $textwidth = $pos_brx - $pos_blx;
                $start_x = ($picwidth - $textwidth) / 2;
                
                imagettftext($myimage, $fontsize, $textangle, $start_x, $y, $black, "TECHNICN.TTF", $line);
                $y += ($maxheight + 3);    
            }
            
            ImagePng($myimage);
            ImageDestroy($myimage);
            ?>
            Last edited by fitnessphotos; 03-12-2003, 05:57 PM.
            SIG TOO BIG! Maximum 120x60 button and no more than 3 text lines of DEFAULT SIZE and COLOR. Unless your sig is for a GFY top banner sponsor, then you may use a 624x80 instead of a 120x60.

            Comment

            • fitnessphotos
              Confirmed User
              • Dec 2002
              • 109

              #7
              Okay - hit QUOTE and you'll see the whole hahahahahaha.

              Enjoy!

              Throw me some traffic if you like it.
              SIG TOO BIG! Maximum 120x60 button and no more than 3 text lines of DEFAULT SIZE and COLOR. Unless your sig is for a GFY top banner sponsor, then you may use a 624x80 instead of a 120x60.

              Comment

              • KnightMare
                So Fucking Banned
                • Nov 2002
                • 281

                #8
                Originally posted by fitnessphotos
                Okay - hit QUOTE and you'll see the whole hahahahahaha.

                Enjoy!

                Throw me some traffic if you like it.
                Good puppy.

                Comment

                • Tala
                  Fucked if I know
                  • Dec 2002
                  • 23368

                  #9
                  I like that sig you have. Nifty lil thingie.


                  ICQ: 11120676 | Google: mindcrime | Skype: suitemindcrime|E-Mail: mindcrime AT gmail.com|PR girl with great writing skills for hire!!!! Contact me to work for YOU!|TECHIEMEDIA? 24/7 support from some of the best techs in the biz. Tell Jim that I sent you.

                  Comment

                  • fitnessphotos
                    Confirmed User
                    • Dec 2002
                    • 109

                    #10
                    Image pieces you need can be found at:

                    http://www.danasoft.com/fun/toughguy.png

                    (and the other two)
                    SIG TOO BIG! Maximum 120x60 button and no more than 3 text lines of DEFAULT SIZE and COLOR. Unless your sig is for a GFY top banner sponsor, then you may use a 624x80 instead of a 120x60.

                    Comment

                    • drops
                      Confirmed User
                      • Feb 2002
                      • 1116

                      #11
                      Originally posted by Tala
                      I like that sig you have. Nifty lil thingie.

                      Why do I get this feeling that the company in you sig must be violating some sort of copyright infringement...
                      <img src=http://porndollar.com/webmasters/banners/porndollar/120x60_25_pd.gif border=0><br>$84 Per Signup | $25 Per Free Signup | $20 Per Cross Sales | Credits On Exits | Paid Weekly
                      <br>Contact Info. http://porndollar.com/support.html

                      Comment

                      • fitnessphotos
                        Confirmed User
                        • Dec 2002
                        • 109

                        #12
                        What company? I own all of them.
                        SIG TOO BIG! Maximum 120x60 button and no more than 3 text lines of DEFAULT SIZE and COLOR. Unless your sig is for a GFY top banner sponsor, then you may use a 624x80 instead of a 120x60.

                        Comment

                        • asuna
                          Confirmed User
                          • May 2002
                          • 8743

                          #13
                          How come YOUR sig doesn't get banned

                          Comment

                          Working...