Skip to content

Instantly share code, notes, and snippets.

@RobSpectre
Created September 21, 2013 20:09
Show Gist options
  • Save RobSpectre/6653725 to your computer and use it in GitHub Desktop.
Save RobSpectre/6653725 to your computer and use it in GitHub Desktop.
Quick example of anonymizing SMS in PHP
<?php
$users = array("+15556667777", "+15556667778");
require_once('auth.php');
require_once('Services/Twilio.php');
$body = $_REQUEST['Body'];
$from = $_REQUEST['From'];
$client = new Services_Twilio($ACCOUNT_SID, $AUTH_TOKEN);
foreach ($users as $user) {
if ($user != $from) {
$message = $client->account->messages->sendMessage(
$TWILIO_NUMBER,
$user,
$body
);
}
}
?>
<Response />
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment