When you send out a lot of mails its nice to know if they are opened or not. One way to do this is by using image tracking.
Say you put in a somewhat useless image into the mail
On the mydomain server you would have to have a redirect in .htaccess like this:
RewriteEngine On RewriteRule open_register.png open_mail_register.php [QSA,L]
The QSA (query string append) directive is important. It ask the apache server to append the query of the link to the php-file we open. This results in the total query:
In the file open_mail_register.php we could save the information that 1234 have opened the mail and then generate some rather useless graphics like this:
<? $user = $_GET['user']; // DO SOMETHING WITH THIS INFO $im = imagecreatetruecolor(4, 4); $c = imagecolorallocatealpha($im, 255, 255, 255, 127); imagefill($im, 0, 0, $c); header('Content-Type: image/png'); header('Cache-Control: must-revalidate, post-check=0, pre-check=0'); header('Expires: 0'); imagepng($im); ?>
Now we are certain that the mail was opened by 1234!
When you open mails from computerworld for instance this technique is applied, without the overhead of masking the .php as a .png. So its in use out there:
<img src=3D"http://track.computerworld.dk/track/open.php?u=3D30077844&id=3D= c1bb774cc86048faa25ef2d2265fb712" height=3D"1" width=3D"1">