/* Sample receive code for sms endpoints. Parameters sent are echoed to the error log. */

$requestKeys = array_keys($_REQUEST);
$keyphrase = "YOUR KEYPHRASE HERE";

$myChecksum = md5($_REQUEST['keyword'] . $_REQUEST['smsmsg'] . $keyphrase);

if ($myChecksum != $_REQUEST['checksum']) {
	error_log('no good');
	return;
} else {
	error_log('good');
}

echo "Begin Key/Value pairs.";
foreach($requestKeys as $r_key) {
    error_log("Request Key: $r_key Request Value: ".$_REQUEST[$r_key]);
}
echo "End Key/Value pairs.";