Created
November 24, 2011 19:27
-
-
Save tylor/1392072 to your computer and use it in GitHub Desktop.
Get an email anytime someone visits this page
This file contains 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($_COOKIE['mailed'])) { | |
$to = '[email protected]'; | |
$subject = 'QR code was used!'; | |
$body = print_r($_SERVER, true); | |
if (mail($to, $subject, $body)) { | |
setcookie("mailed", true); | |
} | |
} | |
?> | |
<!DOCTYPE html> | |
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> | |
<head> | |
<title>You win!</title> | |
<style> | |
body { width: 320px; margin: auto; font-family: "Helvetica Neue", Helvetica, sans-serif; font-size: 0.8em; text-align:center; } | |
</style> | |
</head> | |
<body> | |
<h1>You used our QR code!</h1> | |
<img alt="Kitten!" src="http://placekitten.com/300/2<?php print rand(10,99); ?>" /> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment