Forum Moderators: coopster

Message Too Old, No Replies

email read verify

can it be done....

         

kumarsena

9:06 pm on Nov 28, 2005 (gmt 0)

10+ Year Member



hey,

ive searched google wothout luck and thhis site as well....i was wondering if it is possible to verify if an email has been opened using php? say for instance upon loading an image or something. how would this be implemented? pointers appreciated..

thanks
k

lobo235

9:18 pm on Nov 28, 2005 (gmt 0)

10+ Year Member



I typically use a transparent 1px gif that calls a php script. you could do something like this in the email:

<img src="http://www.example.com/1px_email_track.php?email=example@example.com" />

Then, just write the 1px_email_track.php script that will write the date/time that the img was requested from that email address. This usually works fine. I usually make the script output a real 1px transparent gif too just so the user doesn't get a broken image.

I can post an example with actual code later if you are interested. I am short on time right now.

kumarsena

9:26 pm on Nov 28, 2005 (gmt 0)

10+ Year Member



thnaks. that pointed me in the right direction. but i would appreciate a sample too, jus to compare with what i come up with...whenever you have time..

thanks
k

lobo235

1:17 am on Nov 29, 2005 (gmt 0)

10+ Year Member



When the email is sent initially I add a row to my database that keeps track of when it was sent. Then, the following code below updates the row using the unique id assigned to that particular email.


if( $_GET['id']!= '' )
{
$q = "UPDATE `email_tracker` SET `opened_dt` = NOW() WHERE `id` = ".sq( $_GET['id'] )." AND `opened_dt` IS NULL";
mysql_query( $q );
}
header( 'Content-Type: image/gif' );
header( 'Content-Length: '.filesize( '1px.gif' ) );
readfile( '1px.gif' );

You will need a 1px.gif file which you can easily find on the web or make yourself in Photoshop.

kumarsena

1:56 pm on Nov 30, 2005 (gmt 0)

10+ Year Member



hey,

havent had time to get coing yet, but i will keep your code as a reference. thanks alot!

k