title: CURL: BAD REQUEST error when trying to call http url
body: <p>I am trying to call an sms api using a http url .I am trying to call the url using curl in php.I get a BAD REQUEST error .Please explain what I am doing wrong.</p>
  
  <pre><code>// create a new cURL resource
      $ch = curl_init();
      $string1 = "http://api.znisms.com/post/smsv3.asp?userid=alpesh67&amp;apikey=74c6314840a16c5e7db00415a03181f7&amp;message= Congratulation you have been successfully registered in the Placement Management System \n Email:".$email."\n Password:".$password."&amp;senderid=PMS12345&amp;sendto=".$contactno."";
      echo $string1;
      // set URL and other appropriate options
       curl_setopt($ch, CURLOPT_URL, $string1);
      // grab URL and pass it to the browser
      curl_exec($ch);
      //close cURL resource, and free up system resources
      curl_close($ch);
      //SMS END
  </code></pre>
  
  <p>I get the following error:</p>
  
  <pre><code>http://api.znisms.com/post/smsv3.asp?userid=alpesh67&amp;apikey=74c6314840a16c5e7db00415a03181f7&amp;message= Congratulation you have been successfully registered in the Placement Management System Email:alpeshhi@gmail.com Password:123456789&amp;senderid=PMS12345&amp;sendto=9773396773
  Bad Request
  </code></pre>