title: How to send sms using infobip api in php?
body: <p>I have a problem using Infobip sms gateway. I have no idea about below code when i execute this code there is a error called no HttpRequest class found. Any one please help me.  </p>
  
  <pre><code>&lt;?php
  
  $request = new HttpRequest();
  $request-&gt;setUrl('https://api.infobip.com/sms/1/text/single');
  $request-&gt;setMethod(HTTP_METH_POST);
  
  $request-&gt;setHeaders(array(
    'accept' =&gt; 'application/json',
    'content-type' =&gt; 'application/json',
    'authorization' =&gt; 'Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ=='
  ));
  
  $request-&gt;setBody('{  
     "from":"InfoSMS",
     "to":"41793026727",
     "text":"Test SMS."
  }');
  
  try {
    $response = $request-&gt;send();
  
    echo $response-&gt;getBody();
  } catch (HttpException $ex) {
    echo $ex;
  }
  </code></pre>