title: PHP: Curl not called URL and got Error No =0
body: <p>I am developing one SMS application. I have to call one link 
  for eg <a href="http://sendsms.com/send.php?mobile=45455&amp;msg=hello" rel="nofollow">http://sendsms.com/send.php?mobile=45455&amp;msg=hello</a> for sending SMS</p>
  
  <p>so I used CURL concept to send sms.</p>
  
  <pre><code>$ch = curl_init();
      curl_setopt($ch, CURLOPT_URL, $url);
      $options = array(
          CURLOPT_RETURNTRANSFER =&gt; true, // return web page
          CURLOPT_HEADER =&gt; false, // don't return headers
          CURLOPT_FOLLOWLOCATION =&gt; true, // follow redirects
          CURLOPT_ENCODING =&gt; "", // handle all encodings
          CURLOPT_AUTOREFERER =&gt; true, // set referer on redirect
          CURLOPT_CONNECTTIMEOUT =&gt; 15, // timeout on connect
          CURLOPT_TIMEOUT =&gt; 15, // timeout on response
          CURLOPT_MAXREDIRS =&gt; 10, // stop after 10 redirects
      );
  
      curl_setopt_array($ch, $options);
      $content = curl_exec($ch);
      $err = curl_errno($ch);
      $errmsg = curl_error($ch);
      $header = curl_getinfo($ch, CURLINFO_EFFECTIVE_URL);
  
      $output ="Error:".$err." ErrMsg:".$errmsg." Header:".  json_encode($header);
  </code></pre>
  
  <p>The Problem is message is not sending. I checked the SMS API server. And There also no request is received. So the only problem is CURL may not calling the server. I tried to print the Error msg and I got <code>curl_errno($ch) is 0</code></p>
  
  <p>please provide me the best way to do this</p>