GoFuckYourself.com - Adult Webmaster Forum

GoFuckYourself.com - Adult Webmaster Forum (https://gfy.com/index.php)
-   Fucking Around & Business Discussion (https://gfy.com/forumdisplay.php?f=26)
-   -   My signature - the PHP code (https://gfy.com/showthread.php?t=115277)

fitnessphotos 03-12-2003 07:33 PM

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.

Lane 03-12-2003 07:35 PM

Quote:

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?

fitnessphotos 03-12-2003 07:36 PM

Well, for some reason the CODE tag wont print the code properly; it keeps cutting off the top part of the hahahahahaha.

KnightMare 03-12-2003 07:37 PM

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

fitnessphotos 03-12-2003 07:37 PM

The words censor sucks ass.

fitnessphotos 03-12-2003 07:37 PM

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);
?>


fitnessphotos 03-12-2003 07:38 PM

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

Enjoy!

Throw me some traffic if you like it.

KnightMare 03-12-2003 07:39 PM

Quote:

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.

Tala 03-12-2003 07:46 PM

I like that sig you have. Nifty lil thingie.

:thumbsup

fitnessphotos 03-12-2003 07:58 PM

Image pieces you need can be found at:

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

(and the other two)

drops 03-12-2003 07:59 PM

Quote:

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

:thumbsup

Why do I get this feeling that the company in you sig must be violating some sort of copyright infringement...

fitnessphotos 03-12-2003 08:06 PM

What company? I own all of them.

asuna 03-12-2003 08:08 PM

How come YOUR sig doesn't get banned:mad: :1orglaugh


All times are GMT -7. The time now is 09:31 PM.

Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123