I was only able to make this because of all the tutorials Master of the Universe has posted here ^__^
Be wary this only works if you have the PHP GD library installed on the server
My host had the GD library installed by default, yours might also, if not you can ask Master of the Universe on how to set that up xD
This is an invisible 1x1 pixel that you can embed into forums and other places to get a persons IP without them having to visit a link.
Save the script into a .php file, and embed that in [img][/img] tags
If the site doesnt allow embeding of php in [img] tags make a .jpg file and add this to your .htaccess file: Redirect 301 /picture.jpg /script.php
The log filename is in the first variable $filename, the log will by default be in the same directory as your script in sup.txt
Be wary this only works if you have the PHP GD library installed on the server
My host had the GD library installed by default, yours might also, if not you can ask Master of the Universe on how to set that up xD
This is an invisible 1x1 pixel that you can embed into forums and other places to get a persons IP without them having to visit a link.
Save the script into a .php file, and embed that in [img][/img] tags
If the site doesnt allow embeding of php in [img] tags make a .jpg file and add this to your .htaccess file: Redirect 301 /picture.jpg /script.php
The log filename is in the first variable $filename, the log will by default be in the same directory as your script in sup.txt
PHP Code:
<?php
$filename = "sup.txt";
$logstr = "Connection from:".$_SERVER['REMOTE_ADDR']." at ".date("r",time())."\n";
$width = 1;
$height = 1;
if ($handle = fopen($filename, 'a')) {
fwrite($handle, $logstr);
fclose($handle);
}
$image = imagecreate($width, $height);
$background = imagecolorallocatealpha($image,0,0,0,127);
header ("Content-type: image/png");
imagepng($image);
?>