title: How can I emulate a get request exactly like a web browser?
body: <p>There are websites that when I open specific ajax request on browser, I get the resulted page. But when I try to load them with curl, I receive an error from the server.</p>
  <p>How can I properly emulate a get request to the server that will simulate a browser?</p>
  <p>That is what I am doing:</p>
  <pre><code>$url=&quot;https://new.aol.com/productsweb/subflows/ScreenNameFlow/AjaxSNAction.do?s=username&amp;f=firstname&amp;l=lastname&quot;;
  ini_set('user_agent', 'Mozilla/4.0 (compatible; MSIE 6.0; Windows NT
  5.1; SV1; .NET CLR 1.0.3705; .NET CLR 1.1.4322)');
  $ch = curl_init();
  
  curl_setopt($ch, CURLOPT_URL,$url);
  $result=curl_exec($ch);
  print $result;
  </code></pre>