title: php curl get page like human
body: <p>When I browse online.az site with chrome internet browser everything is OK. Site is opening for me. But I want to open this site with curl. My php code:</p>
  
  <pre><code>// cookie //
  $tmpfname = tempnam("/tmp", "FOO");
  $handle = fopen($tmpfname, "w");
  fwrite($handle, '');
  fclose($handle);
  // cookie //
  function file_get_contents_curl($url) {
  global $tmpfname;
      $ch = curl_init();
      curl_setopt($ch, CURLOPT_AUTOREFERER, TRUE);
      curl_setopt($ch, CURLOPT_HEADER, 0);
      curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
      curl_setopt($ch, CURLOPT_URL, $url);
      curl_setopt($ch, CURLOPT_FOLLOWLOCATION, TRUE);       
      curl_setopt($ch, CURLOPT_COOKIEJAR, $tmpfname);
      curl_setopt($ch, CURLOPT_COOKIEFILE, $tmpfname);
      curl_setopt($ch, CURLOPT_USERAGENT,'Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/39.0.2171.95 Safari/537.36');
      $data = curl_exec($ch);
      curl_close($ch);
      return $data;
  }
  $get = file_get_contents_curl('https://online.az//');
  echo $get;
  </code></pre>
  
  <p>But with this code site is not opening. </p>