Skip to content

Instantly share code, notes, and snippets.

@tsudot
Created September 14, 2012 08:58
Show Gist options
  • Save tsudot/3720875 to your computer and use it in GitHub Desktop.
Save tsudot/3720875 to your computer and use it in GitHub Desktop.
Plivo app to receive a message on Slim Framework
<?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