When you send an email, you may be wondering if the message has been read by the other person. Here's a very interesting piece of code that shows the actual date and time that the other IP address record was read.
Copy CodeThe code is as follows:
error_reporting (0);
Header ("Content-type:image/jpeg");
Get IP
if (!empty ($_server[' http_client_ip '))
{
$ip =$_server[' http_client_ip '];
}
ElseIf (!empty ($_server[' http_x_forwarded_for '))
{
$ip =$_server[' http_x_forwarded_for '];
}
Else
{
$ip =$_server[' remote_addr '];
}
Time
$actual _time = time ();
$actual _day = Date (' Y.m.d ', $actual _time);
$actual _day_chart = Date (' d/m/y ', $actual _time);
$actual _hour = Date (' h:i:s ', $actual _time);
GET Browser
$browser = $_server[' http_user_agent ');
LOG
$myFile = "Log.txt";
$fh = fopen ($myFile, ' A + ');
$stringData = $actual _day. ' ' . $actual _hour. ' ' . $ip. ' ' . $browser. ' ' . "\ r \ n";
Fwrite ($FH, $stringData);
Fclose ($FH);
Generate Image (Es. Dimesion is 1x1)
$newimage = Imagecreate (a);
$grigio = Imagecolorallocate ($newimage, 255,255,255);
Imagejpeg ($newimage);
Imagedestroy ($newimage);
?>
http://www.bkjia.com/PHPjc/621706.html www.bkjia.com true http://www.bkjia.com/PHPjc/621706.html techarticle when you send an email, you may be wondering if the message has been read by the other person. Here's a very interesting piece of code that shows the actual date and time that the other IP address record was read ...