Created
August 2, 2012 09:34
-
-
Save vbaert/3235893 to your computer and use it in GitHub Desktop.
image to put in email to check if mail has been read
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
if(isset($_GET['uid']) && isset($_GET['mid'])){ | |
$mailid = (int)$_GET['mid']; | |
$userid = (int)$_GET['uid']; | |
$db = new mysqli_connect('databaseserver', 'databaseuser', 'databasepassword', 'databasename'); | |
$db->query("INSERT INTO mailreaders (mailid, userid) VALUES ($mailid, $userid)"); | |
$im=imagecreatetruecolor(1,1); | |
$white=imagecolorallocate($im,255,255,255); | |
imagefilledrectangle($im,0,0,1,1,$white); | |
header("content-type: image/jpeg"); | |
imagejpeg($im); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment