When parsing curl, it gives error 307 Temporary Redirect . Who faced how to get around this?
header("Content-type:text/html;charset=utf-8"); $url = 'http://wowcircle.com'; $ch = curl_init($url); $uagent = "Opera/9.80 (Windows NT 6.1; WOW64) Presto/2.12.388 Version/12.14"; // Params curl_setopt($ch, CURLOPT_USERAGENT, $uagent); curl_setopt($ch, CURLOPT_HEADER, true); // curl_setopt($ch, CURLOPT_NOBODY, 1); curl_setopt($ch, CURLOPT_FOLLOWLOCATION, false); curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE); // Get html page $html = curl_exec($ch); // Close curl_close($ch); // Search fragments $pattern = '~<div id="content-header">(.*?)</div>~is'; preg_match($pattern, $html, $search_res); // Show searh results echo $search_res[0]; // print_r($search_res); // Show html echo "<pre>"; print_r($html); echo "</pre>"; 