title: Bad Request while sending SMS from php
body: <p>I am using indiasms's api with curl to send sms</p>
  
  <pre><code> &lt;?php        
  
   $url = "http://12.23.54.18/api/smsapi.aspx?username=myusername&amp;password=mypassword&amp;to=7897015426&amp;from=DEMOAB&amp;message=Your message content.";            
   $curl = curl_init($url);
   curl_setopt_array($curl, array(
                      CURLOPT_RETURNTRANSFER =&gt; 1,
                      CURLOPT_URL =&gt; $url,
                      CURLOPT_USERAGENT =&gt; 'Codular Sample cURL Request'
                  ));
  
   $resp = curl_exec($curl);
   curl_close($curl);
  
   ?&gt;
  </code></pre>
  
  <p>Whenever I run this script I get</p>
  
  <p><strong>Bad Request</strong></p>
  
  <p><strong>HTTP Error 400. The request is badly formed.</strong></p>
  
  <p>What i am doing wrong. ??</p>
  
  <p>Update But when i run without curl it works fine</p>
  
  <pre><code>&lt;a href="http://12.23.54.18/api/smsapi.aspx?username=myusername&amp;password=mypassword&amp;to=7897015426&amp;from=DEMOAB&amp;message=Your message content."&gt;Send Message&lt;/a&gt;
  </code></pre>
  
  <p>When i click this link it works normally</p>