Created
March 10, 2018 18:23
-
-
Save anonymous/2a15c29faa2f0b70648b4b90e2eb4ae7 to your computer and use it in GitHub Desktop.
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 | |
require 'twilio-php-master/Twilio/autoload.php'; | |
use Twilio\Rest\Client; | |
$to = $_POST['to']; | |
$msg = $_POST['msg']; | |
if (substr($to,0,1) == '0') { | |
$to = '+62'.substr($to,1); | |
} | |
$msg = ': | |
'.$msg.'. | |
Indra-Cms'; | |
$sid = 'MASUKKAN sid TWILIO DI SINI'; | |
$token = 'MASUKKAN token TWILIO DI SINI'; | |
$client = new Client($sid, $token); | |
$client->messages->create( | |
$to, | |
array( | |
'from' => 'MASUKKAN nomor dari TWILIO DI SINI', | |
'body' => $msg | |
) | |
); | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment