title: php curl is not working while debug proxy server like fiddler is working
body: <p>I am trying to scrape from a site which is behind cloudflare.
  My code is::</p>
  <pre><code>$ch = curl_init();
  curl_setopt($ch,CURLOPT_URL, 'https://targetsite');     
  curl_setopt($ch, CURLOPT_CUSTOMREQUEST, &quot;POST&quot;); 
  curl_setopt($ch, CURLOPT_POSTFIELDS, '{&quot;current_bid_status&quot;:true}');
  curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);  
  curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
  curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false);
  curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); 
  curl_setopt($ch, CURLOPT_COOKIEJAR, &quot;cookie.txt&quot;); 
  curl_setopt($ch, CURLOPT_COOKIEFILE, &quot;cookie.txt&quot;); 
  curl_setopt($ch, CURLOPT_HTTPHEADER, [                  
      'User-Agent: Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/43.0.2357.130 Safari/537.36',
      'Accept: application/json',
      'Accept-Language: en-US,en;q=0.5',  
      'Content-Type: application/x-www-form-urlencoded',
      'Content-Length: '.strlen($data)                    
  ]);
  $result = curl_exec($ch);
  $status = curl_getinfo ($ch);
  </code></pre>
  <p>The response header was 403, and the response body was <code>error code: 1020</code>
  It looks like cloudflare is blocking the request.
  But when i add fiddler proxy:</p>
  <pre><code>curl_setopt($ch, CURLOPT_PROXY, '127.0.0.1:8888');
  </code></pre>
  <p>It works nicely!</p>
  <p>What can be the possible reason here? Is it something related with ssl certificate?</p>
  <p>_</p>