Home - PHP- Ip Image Generator
/*
FluidCoding - Ip Image Generator
Author: Brian Sonnie
*/
<?php
// Get the Ip
$ip = $_SERVER['REMOTE_ADDR'];
header("Content-type: image/png");
// Create an image width: 250, height: 40.
$im = @imagecreate(205, 40)
or die("Cannot Initialize new GD image stream");
// Background Color = black
$background_color = imagecolorallocate($im, 0, 0, 0);
// Text Color = Red
$text_color = imagecolorallocate($im, 255, 0, 0);
// Print First line onto image
imagestring($im, 3, 10, 5, "Your Ip is: ".$ip, $text_color);
// Print Second Line
imagestring($im, 3, 10, 5+imagefontheight(3),
"Generated by FluidCoding", $text_color);
imagepng($im);
// Free up memory
imagedestroy($im);
?>