title: When i run curl i get status 0
body: <p>I am using this code to get page from internet...but i get result status 0</p>
  
  <pre><code>$url='http://www.jiwlp.com';
  
  $this-&gt;url = $url;
  
  if (isset($this-&gt;url)) {
  
      // start cURL instance 
      $this-&gt;ch = curl_init ();
  
      // this tells cUrl to return the data
      curl_setopt ($this-&gt;ch, CURLOPT_RETURNTRANSFER, 1);
  
      // set the url to download 
      curl_setopt ($this-&gt;ch, CURLOPT_URL, $this-&gt;url); 
  
      // follow redirects if any 
      curl_setopt($this-&gt;ch,CURLOPT_FOLLOWLOCATION, true); 
  
      // tell cURL if the data is binary data or not 
      curl_setopt($this-&gt;ch, CURLOPT_BINARYTRANSFER, $this-&gt;binary); 
  
      $useragent="Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.1) Gecko/20061204 Firefox/2.0.0.1";
  
      curl_setopt($this-&gt;ch, CURLOPT_SSL_VERIFYPEER, true);
      curl_setopt($this-&gt;ch, CURLOPT_SSL_VERIFYHOST, false); 
      curl_setopt($this-&gt;ch, CURLOPT_VERBOSE, 1);  
      curl_setopt($this-&gt;ch, CURLOPT_USERAGENT, $useragent); 
      curl_setopt($this-&gt;ch, CURLOPT_TIMEOUT, 5);
  
      // grabs the webpage from the internet 
      $this-&gt;html = curl_exec($this-&gt;ch);
      $this-&gt;status = curl_getinfo($this-&gt;ch, CURLINFO_HTTP_CODE);
  
      print_r(curl_getinfo($this-&gt;ch)); // closes the connection
      curl_close ($this-&gt;ch);
  }
  </code></pre>
  
  <p>Can anyone plz explain what i am doing wrong.</p>
  
  <p>Thanks</p>