Skip to content

Instantly share code, notes, and snippets.

@RobSpectre
Created November 11, 2011 17:08
Show Gist options
  • Save RobSpectre/1358572 to your computer and use it in GitHub Desktop.
Save RobSpectre/1358572 to your computer and use it in GitHub Desktop.
Receive a "1" in the body
<?php
if (isset($_REQUEST['Body'])) {
$body = $_REQUEST['Body'];
} else {
$body = False;
}
if ($body && $body == "1") {
$message = "1 is active.";
// Add additional logic here...
} elseif ($body) {
$message = "Received something other than 1: ".$body;
} else {
$message = "Received nothing in the body.";
}
?>
<Response>
<Sms><?php echo $message; ?></Sms>
</Response>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment