title: Codeigniter twilio integration
body: <p>I am trying to get twilio to work with my website to send SMS.</p>
  <p>Here are the steps i took,</p>
  <p>First i downloaded the latest repo and put the Twilio folder under /libraries</p>
  <p>then i added</p>
  <pre><code>$config['composer_autoload'] = '/libraries/Twilio/autoload.php';
  </code></pre>
  <p>to config/config.php</p>
  <p>Then in my controller ,</p>
  <p>I have a function that is,</p>
  <pre><code>$number = 'xx';
  $country = '1';
  
  $to = '+'.$country.$number;
  require(APPPATH . &quot;/libraries/Twilio/autoload.php&quot;);
  
  // Use the REST API Client to make requests to the Twilio REST API
  // Your Account SID and Auth Token from twilio.com/console
  $sid = &quot;xx&quot;; // Your Account SID from www.twilio.com/console
  $token = &quot;xx&quot;;
  $client = new Twilio\Rest\Client($sid, $token);
  
  // Use the client to do fun stuff like send text messages!
  $client-&gt;messages-&gt;create(
      // the number you'd like to send the message to
      $to,
      array(
          // A Twilio phone number you purchased at twilio.com/console
          'xxx' =&gt; 'ADD Your Free/purchased Number',
          // the body of the text message you'd like to send
          'body' =&gt; &quot;Hey Emir! It's Works&quot;
      )
  );
  </code></pre>
  <p>So my problem is, when i run the view, this is the error i get,</p>
  <blockquote>
  <p>A PHP Error was encountered</p>
  <p>Severity: Warning</p>
  <p>Message: require(/var/www/xxx.com/public_html/application/libraries/Twilio/Twilio/Rest/Client.php): failed to open stream: No such file or directory</p>
  </blockquote>
  <p>So for some reason, Twilio/autoload.php adds another /Twilio in the path and i can't figure it out.</p>
  <p>Any help?</p>