Posts Tagged ‘ip’

Howto Show Visitors IP Address in a Image

Hello!
This is what you will get after you are done

this is (((easy)))

What you need

  1. index.php
  2. new directory (folder)
  3. .png image

Ok so start off with a index.php and here is the code that you will need..

 <?
header("Content-type: image/png");
$im = imagecreatefrompng ("yourip.png");
$colour = imagecolorallocate($im, 255, 255, 255);
$ip = "$_SERVER[REMOTE_ADDR]";
imagestring($im, 3, 71, 2, $ip, $colour);
imagepng($im);
?>

Now you need the a image here one for the tut..(duh)
(save it)

Now you need to make a folder via FTP mine is called yourip but you can call it what you want.

Then all you gota do is upload it..

VN:F [1.9.3_1094]
Rating: +3 (from 3 votes)