Created
December 17, 2012 18:57
-
-
Save sbkinney/4320878 to your computer and use it in GitHub Desktop.
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 | |
$to = ''; //Whatever email you want | |
$subject = 'Test Target'; | |
if ($_SERVER['REQUEST_METHOD'] == 'POST') | |
{ | |
$message = "POST: \n"; | |
foreach($_POST as $key=>$value) | |
{ | |
$message = $message . $key . ' => ' . $value . "\n"; | |
} | |
$message = $message . $_SERVER['REQUEST_URI']; | |
} | |
else if ($_SERVER['REQUEST_METHOD'] == 'GET') | |
{ | |
$message = "GET: \n"; | |
foreach($_GET as $key=>$value) | |
{ | |
$message = $message . $key . ' => ' . $value . "\n"; | |
} | |
$message = $message . $_SERVER['REQUEST_URI']; | |
} | |
else | |
{ | |
$message = "WTF"; | |
} | |
mail($to, $subject, $message); | |
echo $message; | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment