I play with the idea of ββadding email tracking to the web service that I created for a small client business. I planned to make an embedded image solution (with a link to an image on my server) - if someone else does not have a better method, but when I use an image tag that links to a PHP page on my server, it uploads a "broken" image. How to make it valid?
Here is the code for the PHP post page:
<?php $body = "<html>Hello there!". "<img src='http://mysite.com/track.php?name=bob' />". "</html>"; $subject = "Tracking on ".date('Ymd H:i:s'); $headers = 'MIME-Version: 1.0' . "\r\n"; $headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n"; $headers .= 'From: webmaster@mysite.com ' . "\r\n"; mail(' my_email@gmail.com ',$subject,$body,$headers); ?>
And here is the tracking code:
<?php include('database_connection.php'); $query = "INSERT INTO tracking SET name='".$_GET['name']."', date=NOW()"; mysql_query($query);
source share