Created
September 14, 2012 08:58
-
-
Save tsudot/3720875 to your computer and use it in GitHub Desktop.
Plivo app to receive a message on Slim Framework
This file contains hidden or 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 | |
| $app = new \Slim\Slim(); | |
| $app->post('/message_receive', function () { | |
| $req = $app->request(); | |
| //The source number of the message. For eg.15671821841 | |
| $from = $req->post('From'); | |
| // The number to which the message was received at. For eg.15671821841 | |
| $to = $req->post('To'); | |
| // Type of the message, For eg. sms | |
| $type = $req->post('Type'); | |
| // Message content. | |
| $text = $req->post('Text'); | |
| // A unique ID for the message. | |
| $message_uuid = $req->post('MessageUUID'); | |
| }); | |
| ?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment