title: Send sms in codeigniter
body: <p>When I am sending sms response is always show an empty JsonNode in postman</p>
  <p>my code is</p>
  <pre><code>function sendmessage(){
          $mobileNo=$this-&gt;input-&gt;post('mobile');
          $channel='';
          $pass='';
          $password=base64_encode($pass);
          $message='Hello, This is a test message';
      
          $postData=array([
                    'channel' =&gt;array(
                         'channel' =&gt;  $channel,
                         'password' =&gt; $password,
                       ),
                    'messages'=&gt;array(
                          'text'=&gt;$message,
                          'msisdn'=&gt;$mobileNo,
                          &quot;source&quot;=&gt;&quot;littlebloom&quot;,
                        )
              ]);
      $dataread=json_encode($postData);
      
  
  
  /* API URL*/
        $url=&quot;https://secure-gw.fasthub.co.tz/fasthub/messaging/json/api&quot;;
  /* init the resource */
        $ch = curl_init();
        curl_setopt_array($ch, array(
          CURLOPT_URL =&gt; $url,
          CURLOPT_RETURNTRANSFER =&gt; true,
          CURLOPT_POST =&gt; true,
          CURLOPT_POSTFIELDS =&gt; $dataread,
        ));
        /* Ignore SSL certificate verification */
         curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
         curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
        /* get response */
        $output = curl_exec($ch);
        /* Print error if any */
        if(curl_errno($ch))
        {
          $array=array( 'error'=&gt; curl_error($ch));
          echo json_encode($array);
        }
        else{
          $array = array(
            &quot;message&quot;    =&gt; $output
          );
        }
        curl_close($ch);
        //MESSAGE CODE END
        echo $output;
  }
  </code></pre>
  <p>This is my function for sending sms in codeigniter. Client give url of FastHub  sms service provide and also give the Json request code which is following given. I am using this in postman when i use this the json as row at given url it gives successfull msg but when i use my codeigniter code  its show error &quot;Empty JsonNode&quot;.
  how can i define this json in my code.</p>
  <p>sms service provider is FastHub</p>
  <p>and its <code>json</code> request is like</p>
  <pre><code>&quot;channel&quot;:{
         &quot;channel&quot;:113474,
         &quot;password&quot;:&quot;Base64(sha-256(plain_password))&quot;
    },
  &quot;messages&quot;:[
     {
        &quot;text&quot;:&quot;test message&quot;,
        &quot;msisdn&quot;:&quot;255754088816&quot;,
        &quot;source&quot;:&quot;TEST&quot;
     }
  ]
  }
  </code></pre>
  <p>How can I send this type of json in $postData...</p>