title: Accept-Language of CURLOPT_HTTPHEADER does not work
body: <blockquote>
    <p><a href="https://stackoverflow.com/questions/15071298/curl-set-language-header">cUrl set language header</a></p>
  </blockquote>
  
  <p>I was trying to get the source code of Facebook's homepage by using cURL, but it was all Chinese due to the location of my server host. For this reason, I added <code>Accept-Language</code> of <code>CURLOPT_HTTPHEADER</code> to change the language to English, but failed. According to the answer I quoted above, below is the PHP code of cURL I tried:</p>
  
  <pre><code>&lt;?php
  
  $url = "http://www.facebook.com/";
  
  if(isset($_SERVER['HTTP_USER_AGENT']))
      $user_agent = $_SERVER['HTTP_USER_AGENT'];
  else
      $user_agent = "";
  
  $options = array(
      CURLOPT_RETURNTRANSFER =&gt; true,     // return web page
      CURLOPT_HEADER         =&gt; false,    // don't return headers
      CURLOPT_FOLLOWLOCATION =&gt; true,     // follow redirects
      CURLOPT_HTTPHEADER     =&gt; array("Accept-Language: en-US;q=0.6,en;q=0.4"),
      CURLOPT_USERAGENT      =&gt; $user_agent);
  
  $ch      = curl_init($url);
  curl_setopt_array($ch, $options);
  $content = curl_exec($ch);
  $err     = curl_errno($ch);
  $errmsg  = curl_error($ch);
  $header  = curl_getinfo($ch);
  curl_close($ch);
  
  echo $content;
  
  ?&gt;
  </code></pre>
  
  <p>But it still showed Chinese:</p>
  
  <p><a href="https://i.stack.imgur.com/Z9W5Z.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Z9W5Z.jpg" alt="The Facebook was all Chinese."></a></p>
  
  <p>How can I solve this problem?</p>