Email tracking with image


I am able to track event when someone open my email using image in email message.

I am able to get time stamp and other query string parameters.

How to get the country,IP and other items without passing them in query string.

Any idea?


That would be in your access/request logs on your server. When the image gets processed, it will come from an IP address which will be stored in your access.log.

Is there any php way to get any of this information?

Read the access.log (using PHP).


Or you change the image src to point to a PHP file

<img src="email_image.php" />

Inside email_image.php, the last part of the script should be performing read_file('actualimage.jpg"); so it outputs an image to the email client.

above that line, you could use $_SERVER[‘REMOTE_ADDR’] and log that somewhere.

1 Like

Good. I think this will help.

Any idea about any article or script to get country using IP using Php?

You can interact with an API for

1 Like

Good Man :smile:

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.