Forum Moderators: coopster
<?php
$time = date('dS M Y (H:i:s)');
$host = gethostbyaddr($_SERVER['REMOTE_ADDR']);
@mysql_connect("localhost", "user", "pass") or die;
@mysql_db_query("database", "INSERT INTO views VALUES ('','$user','$REMOTE_ADDR','$host','$time','$HTTP_USER_AGENT')");
?>
The image is like this (comes from a database, hence the use of $row[] array)
<img src="http://example.com/image.php?user=$row[username]" height="0" width="0">
It's a simple one that I wrote, so I can't say that it' any good. ;) Also, remember that a great number of people (the majority?) now have images turned off in emails by default.