Created
June 16, 2011 18:09
-
-
Save andrewwatson/1029846 to your computer and use it in GitHub Desktop.
SMS To Demo
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 | |
header("Content-type: text/xml"); | |
if ($_POST['Digits'] == "12345") { | |
$response = ' | |
<Say>That is Correct</Say> | |
<Gather action="send.php" numDigits="10"> | |
<Say>Type the number of the person to message</Say> | |
</Gather> | |
'; | |
} else { | |
$response = ' | |
<Say>That was incorrect.</Say> | |
<Redirect>step1.xml</Redirect> | |
'; | |
} | |
?> | |
<Response> | |
<?php echo $response; ?> | |
</Response> |
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 | |
header("Content-type: text/xml"); | |
$whoToSms = $_POST['Digits']; | |
?> | |
<Response> | |
<Say>Sending to <?php echo $whoToSms; ?></Say> | |
<Sms to="<?php echo $whoToSms; ?>">This is your message</Sms> | |
</Response> |
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
<Response> | |
<Gather action="secret.php" numDigits="5" timeout="10"> | |
<Say>Enter The Secret Code</Say> | |
</Gather> | |
</Response> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment