i m trying to send a SMS from my trail Twilio account. so please help to get sms response/status
$client = new Client(TWILIO_SID, TWILIO_TOKEN);
$client->messages->create(
$mobile,
array(
'from' => TWILIO_FROM_NUMBER,
'body' => $mobile_message,
//'statusCallback' => "https://requestb.in/v9uqy6v9"
'statusCallback' => base_url()."sms_status.php"
)
);
//$status = file_get_contents('https://requestb.in/v9uqy6v9');
$status = file_get_contents(base_url()."sms_status.php");
when i run the above code i got error:
Message: file_get_contents(http://.../sms_status.php): failed to open stream: HTTP request failed! HTTP/1.1 404 Not Found
while i manually browse the sms_status.php file url than it's not got any error
i also follow this link How to get notified when SMS Status changes from 'Queued' to 'Sent'?
so please help me to resolve above problem and also define what will be format of output like json/text/array.....