This script uses the Twilio API send a personalized MMS message to a designated recipient. This is configured to run locally. Install XAMPP, start Apache, save to "C:\xampp\htdocs\mms.php", test with "http://localhost/mms.php". It requires the Twilio PHP Helper library be installed, see "https://www.twilio.com/docs/libraries/php" For more info on the Twilio SMS API for PHP see "https://www.twilio.com/docs/sms/quickstart/php" Replace the $sid and $token variables with an active Twilio account's credentials <?php require __DIR__ . '/twilio-php-main/src/Twilio/autoload.php'; use Twilio\Rest\Client; $recipient = $_GET["Recipient"]; $name = $_GET["Name"]; $sid = 'EXAMPLE5b4f3eb72fbea97532fe7c0439c'; $token = 'EXAMPLE59a2353a265babc031c730d15'; $client = new Client($sid, $token); $client->messages->create("$recipient",['from' => '+13262224991','body' =>"Hey $name! Check out this owl!","mediaUrl" => ["https://demo.twilio.com/owl.png"]]); header("Location: https://postback.goformz.com/webviewreturn?Result=MessageSent"); ?> This script uses the Twilio API to send a personalized voice message to a designated recipient. This is configured to run locally. Install XAMPP, start Apache, save to "C:\xampp\htdocs\voice.php", test with "http://localhost/voice.php". It requires the Twilio PHP Helper library be installed, see "https://www.twilio.com/docs/libraries/php" For more info on Twilio Programmable Voice API for PHP see "https://www.twilio.com/docs/voice/quickstart/php" Replace the $sid and $token variables with an active Twilio account's credentials. <?php require __DIR__ . '/twilio-php-main/src/Twilio/autoload.php'; use Twilio\Rest\Client; $recipient = $_GET["Recipient"]; $sid = "EXAMPLE5b4f3eb72fbea97532fe7c0439c"; $token = "EXAMPLE59a2353a265babc031c730d15"; $client = new Twilio\Rest\Client($sid, $token); $call = $client->calls->create( "$recipient",'13262224991',['url' => 'https://twimlets.com/holdmusic?Bucket=com.twilio.music.ambient']); header("Location: https://postback.goformz.com/webviewreturn?Result=CallCompleted"); ?> |