I am trying to send msg to a number using Plivo API in PHP. I at first I gave two USA numbers as source and destination. It didn't worked so I gave Indian Non DND numbers after that. Still the code is not working. As I am trying this for the first time can anyone please help me what is the error. (Note:: I am using Code-igniter framework)
public function sendsms()
{
$this->load->helper('url');
require_once APPPATH.'libraries/plivo_php/plivo.php';
$auth_id = "MAYZU4MDGXXXXXXXXXXX";
$auth_token = "M2JmYTQwMDY1MTXXXXXXXXXXXXXXXXXXXXXXXXXX";
$p = new RestAPI($auth_id, $auth_token);
// Send a message
$params = array(
'src' => '917XXXXXXXXX',
'dst' => '919XXXXXXXXX',
'text' => 'Hi, Message from Srusti',
'type' => 'sms'
);
$response = $p -> send_message($params);
// Print the response
echo "Response : ";
print_r ($response['response']);
$this->load->view('sendsms');//Here sendsms is the view name..
}
Dear there may be following possibilities may happen.
These are the issues that may causing an error.