2001 The Central Ohio Linux User Group. // All rights reserved. // Released under the GPL, v. 2. See: LICENSE.TXT // // initially inspired by: // http://hotwired.lycos.com/webmonkey/01/21/index4a_page3.html?tw=programming // // All you need is Love ... // $url=parse_url("$REQUEST_URI"); $base64 = $url[query]; $showaddr = base64_decode($base64); list($lll,$rrr) = explode("~",$showaddr); // list($lll,$rrr) = explode("_",$lll); $email = "hunh?" ; if ( "$rrr" != "" && "$lll" != "") { $email = $rrr . "@" . $lll ; } //create a new image called $image, 200 by 200 //pixels $width = 600 ; $height = 60 ; $hoff = 5 ; $voff = 5 ; // // fill in the entire image with a white background // - note that the first two arguments (after the image name) are // the X and Y coordinates of the upper left corner of the // rectangle, the second two are the coordinates of the lower // right corner, and the last argument is the fill color // $font = 5; $png = ImageCreate($width, $height); $bg = ImageColorAllocate($png,255,255,255); $txt = ImageColorAllocate($png,0,0,0); // ImageFilledRectangle($png,0,0,$width,$height,$bg); ImageString($png,$font,$hoff,$voff,$email,$txt); // // send the image header("content-type: image/png"); ImagePNG($png); if (6 == 9) { // a tribute to Jimi // // // Scale and center $h10 = $height / 10 ; $h80 = $height - ( $h10 + $h10 + $h10 ) ; $h40 = $h80 / 2 ; $h90 = $height - $h10 ; // save 10 at the bottom for descenders $w10 = $width / 10 ; $w80 = $width - ( $w10 + $w10 ) ; // $image = imagecreate($width,$height); // //allocate some colors $white = imagecolorallocate($image, 255, 255, 255); $black = imagecolorallocate($image, 0, 0, 0); // Send a header to the browser indicating that this is a PNG image. // Remember to never send anything to the browser before the header, // unless you're just itching for an error. // header("Content-type: image/png"); // imagefilledrectangle($image, 0, 0, $width, $height, $white); // //write a message in black // // the arguments to ImageTTFText are, in //order, the image name, the length // in pixels of the text, the angle (starting //at 0 for normal text, // and proceeding counterclockwise, the X and //Y coordinates of // the starting point, the color, the TrueType //font file, and the // content of the text. // // HEIGHT in pixels of text scales it ... // // imagettftext($image, $h40, 0, $w10, $h80, $black, // "./fonts/helb____.ttf","$email"); imagettftext($image, $h40, 0, $w10, $h80, $black, "./fonts/helb____.ttf","$email"); // //push the completed image out imagepng($image); // //finally, free up the memory allocated for //the image imagedestroy($image); } // ?>