PHP version 5.2.3 and Twilio, issues with sending SMS -


i'm having bit of trouble sending sms on web application using php version 5.2.3 (i have been asked not update version).

i have tried same code on local php server (which works fine), uses 5.5.14. code is:

<?php     require 'twilio-php-master/services/twilio.php';     $account_sid = 'sadasdasd123';      $auth_token = 'sdfsdfdsfds678';      $client = new services_twilio($account_sid, $auth_token);      try {         $message = $client->account->messages->create(array(             "from" => "1234567890",             "to" => "9876543211",             "body" => "test message!"         ));     } catch (services_twilio_restexception $e) {         echo $e->getmessage();     }      echo "sent message {$message->sid}"; ?> 

according twilio php documentation, 5.2.3 minimum version can use.

any ideas on issue appreciated. stated, cannot update php 5.2.3 version.

they have updated documentation , faced issue after research able sending sms , writing steps should follow , work.

download    [https://github.com/twilio/twilio-php/archive/master.zip][1] refernce    [https://www.twilio.com/docs/api/rest/sending-messages][1]  require_once("/path/twilio.php");  $client     =       new services_twilio(accountsid, authtoken); $sms_from   =       "+1xxxxxxxxxx"; $sms_to     =       "+1xxxxxxxxxx"; $sms_body   =       "test message"; $message    =       $client->account->messages->sendmessage($sms_from, $sms_to, $sms_body);  echo "<pre>"; print_r($message); echo "</pre>"; 

it should work on 5.2.3


Comments