17 lines
402 B
PHP
Executable File

<?php
if ( ! defined('BASEPATH')) exit('No direct script access allowed');
use Twilio\Rest\Client;
function send_sms($code,$to,$msg){
$CI=&get_instance();
$client=new Client(''.TWILIO_SMS_SID, ''.TWILIO_SMS_AUTH_TOKEN);
$send=$client->messages->create(
''.$code.$to,
array(
"from" => ''.TWILIO_SMS_PHONE_NUMBER,
'body' => ''.$msg
)
);
}
?>