Thanks! Here's what you submitted:
QQQ;
$json .= "";
foreach($_REQUEST as $k=>$v) {
// Pretty formatting
$k = ucwords(str_replace("_", " ", $k));
$json .= "- " . $k . ": " . $v . "
";
}
$json .= "
";
// Throw in the date, time, script name, and server name,
// just to help show that this does, in fact, happen on the remote server
$date = date("F j, Y");
$time = date("g:i a");
$json .= <<Processed by {$_SERVER['SCRIPT_NAME']} on {$_SERVER['SERVER_NAME']} at {$time} on {$date}.
QQQ;
$json .= <<Try it again?
QQQ;
// Format the message so as not to break anything
$json = str_replace("'", "'", $json);
$json = str_replace("\n", "", $json);
// Pretend that this is JavaScript
header("Content-Type: text/javascript");
// JavaScript output
echo <<