如何使用PHP追踪Gmail中的电子邮件

时间:2019-06-14 16:12:08

标签: php html-email

嗨,我建立了一个电子邮件跟踪器,除了在Gmail上以外,它都能正常运行

已发送HTML电子邮件上的IMG代码

$track_code = md5(rand());
<img src="https://www.syste-mart.com/tracker.php?code='.$track_code.'" width="1" height="1" title="Syste-mart">

tracker.php

<?php
include "conexion.php";
$db = mysql_connect($host,$username,$passwordDB);
mysql_select_db($database,$db);
mysql_query("SET CHARACTER SET utf8", $db); 
mysql_query("SET NAMES 'utf8'", $db);
mysql_query("SET character_set_client=utf8", $db);
mysql_query("SET character_set_connection=utf8", $db);
mysql_query("SET character_set_results=utf8", $db);
mb_language('uni');
mb_internal_encoding('UTF-8');


$code=$_GET['code'];
$ipAddress = $_SERVER['REMOTE_ADDR'];
$fecha=date("Y-m-d");
$hora=date("H:i:s");
if($code!=0){
//This will insert a row each time the email is opened
$inserTrack=mysql_query("INSERT INTO emailTrack (idEmailTrack, track_code, ip, fecha, hora) VALUES ('', '$code', '$ipAddress', '$fecha', '$hora')", $db);
}


echo "<img src='https://syste-mart.com/images/mail.png' width='30' height='30'>";

?>

我在gmail中收到的错误是: 所请求的URL /代理/ SZKsK8dZS1ZgM4QsOMe78tbq5Pz-2eT5G7rdKoBw6onZwoDU0hOZ4J2qxO06uuEAjh479rICREC3e2PZkbx9yLEAq4RosKVG255lDwkcLYwRgrArBkCJeW1YLYja-v8DKtHoRfh2o1S7TG01eSbhdDEocSDGRSn11SA75z2WzOdMl7XYDB_p3Mywx1xNjzc_4kugvMgKu3-AR9wVRgryZ3Yo4cYanTzENcjf = S0-d-E1-英尺未在此服务器上找到

有什么想法吗? 谢谢

0 个答案:

没有答案