Hey, Would you like to work at Home ?? Just click here No need to pay, just register free and activate your account and get data Entry Work at your Home.

Thursday, August 30, 2007

Show users IP in a graphic - PHP Script

Show IP Display visitor's IP Address in a graphic with this simple php code.

(Please do not link to this image, it is for demonstration only.)

Your IP Address

create a new page, copy the text below and save it as image.php (or whatever you wish)


$img_number = imagecreate(275,25);
$backcolor = imagecolorallocate($img_number,102,102,153);
$textcolor = imagecolorallocate($img_number,255,255,255);

$number = " Your IP is $_SERVER[REMOTE_ADDR]";


header("Content-type: image/jpeg");


All you'll need to display on other pages is the code below.

<img src="http://yoursite/image.php" border="1">

obviously you'll need to replace "http://yoursite", with the path to your site.

note: this code will only on systems that support GD image tools

No comments:

Your Ad Here