View Single Post
Old 07-11-2006, 09:38 AM   #2 (permalink)
andrew247
Google Guru
 
andrew247's Avatar
 
Join Date: Oct 2005
Location: c:\GoogleCommunity
Posts: 3,386
Thanks: 3
Thanked 13 Times in 13 Posts
andrew247 is a glorious beacon of lightandrew247 is a glorious beacon of lightandrew247 is a glorious beacon of lightandrew247 is a glorious beacon of lightandrew247 is a glorious beacon of light
PNG image [I think other image types work too, but PNG springs to mind].
You have to generate the PNG using PHP then destroy the image when done.

You need a folder on your webserver, and you need to put a .htaccess file in this folder with the following code:
Code:
AddType application/x-httpd-php .png
You need to put an image in this folder called sigback.png (called in php file).


Then, this should be saved as sig.png:
Code:
<?php

header("Content-type: imageNG");

$text2 = "Your IP is: '.$_SERVER['REMOTE_ADDR'].'.";

$image = imagecreatefrompng("sigback.png");
/* Hex text colour */
$colour = imagecolorallocate($image, 255, 255, 255);

/* X and Y coordinates for the text on your image */

$px=120;
$py=30;

imagestring($image, 2, $px, $py+12, $text2, $colour);

imagepng($image);
imagedestroy($image);
?>
This is untested, so I don't know if it'll work.
andrew247 is offline   Reply With Quote