我想与卷曲和当前代码假引荐工作正常:卷曲的Referer和重定向
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'http://www.target-url.com/');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_REFERER, 'http://www.facebook.com/');
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
//curl_setopt($ch, CURLOPT_HEADER, true);
curl_setopt($ch, CURLOPT_AUTOREFERER, false);
$html = curl_exec($ch);
curl_close ($ch);
echo $html;
的问题,我要解决的是,当我在浏览器中运行代码URL保持不变(在顶部浏览器在哪里输入URL)。 那么代码保持在最上的页面的URL。但是我想要真正的重定向,比如 header('Location:')命令。
你能帮忙吗?
你想要做什么?在地址栏中显示http://www.target-url.com/? –