Hi You must have seen those Signature of people which show us the IP address .. here`s how you do it . :cool: :
1. First save a blank .txt file named counter.txt
2. then open notepad (or any PHP-editor u use) and paste this code :
<?php
$TextFile = "counter.txt";
$Count = trim(file_get_contents($TextFile));
$FP = fopen($TextFile, "r");
$Count=fgets($FP, 4096);
fclose ($FP);
settype($Count, "integer");
$Count++;
if ($FP = fopen ($TextFile, "w")){
fwrite ($FP, $Count);
fclose ($FP);
}
$image = "counterpic.png";
$im = imagecreatefrompng($image);
$red = ImageColorAllocate ($im, 255, 0, 0);
$blue = ImageColorAllocate ($im, 0, 0, 255);
$hit = "$Count";
$ip = $_SERVER["REMOTE_ADDR"];
ImageString($im, 2, 18, 1, "www.sr-ultimate.com", $blue);
ImageString($im, 2, 1, 19, " Your ip: $ip", $red);
ImageString($im, 2, 1, 30, " Page visited $hit times ", $red);
header("Content-Type: image/png");
Imagepng($im,'',100);
ImageDestroy ($im);
?>
3. Save it as index.php or anything u like just with .php extention
4. Now save the 3 files index.php , counter.txt & this image in a folder and upload it through FTP to any server supporting php.
5. Grant counter.txt CMOD 777 ( right click in FTP > properties > all previlages)
6. Then call index.php in your browser . that`s it :cheesy: