时间:2021-07-01 10:21:17 帮助过:2人阅读
http://www.chong4.com.cn/cydb/go.php?7218_29882_22t
如果不是在代码内跳转,估计要用socket才能抓到header
curl好像也有获取header的,你查查
估计是根据后面的变量实现跳转的
fsockopen方式获取这个页面,分析里面的Location后获得跳转地址。
$headers = get_headers('http://www.chong4.com.cn/cydb/go.php?7218_29882_22t', true);if(is_array($headers['Location'])){ $headers['Location'] = array_pop($headers['Location']);}$script = file_get_contents($headers['Location']);echo $script;
通过 302 跳转到 'http://s.click.taobao.com/t_js?tu=http%3A%2F%2Fs.click.taobao.com%2Ft%3Fe%3DzGU34CA7K%252BPkqB07S4%252FK0CFcRfH0G7DbPkiN9MMH7EkQ%252B3KnWlM5fPrbcF5EKeNJ3Ts8ijJ4%252F77oX8O2iw1qEuhEhgaut73j9hJ3YPtNYm616DyrkK0aE1E31WN8TefmpCriY9EJ5O4JCWiRap3Rj1hfNxI2HSqhk8lK01rAylx5%252F9fHp6i%252FPRGYAGeegVo%252F%26spm%3D2014.12231445.1.0%26u%3D22t7218%26ref%3D%26et%3DjFBB1tzvZVjt5A%253D%253D
可以得到一段 js 代码
其中有 qs = location.search.split("?")[location.search.split("?").length-1].split("&");
所以需要用上述url 替换掉 location.search
执行js代码后,得到
本帖最后由 xuzuning 于 2013-01-17 13:01:04 编辑
通过 302 跳转到 'http://s.click.taobao.com/t_js?tu=http%3A%2F%2Fs.click.taobao.com%2Ft%3Fe%3DzGU34CA7K%252BPkqB07S4%252FK0CFcRfH0G7DbPki……
http://s.click.taobao.com/t_js?tu=http%3A%2F%2Fs.click.taobao.com%2Ft%3Fe%3DzGU34CA7K%252BPkqB07S4%252FK0CFcRfH0G7DbPkiN9MMH7EkQ%252B3KnWlM5fPrbcF5EKeNJ3Ts8ijJ4%252F77oX8O2iw1qEuhEhgaut73j9hJ3YPtNYm616DyrkK0aE1E31WN8TefmpCriY9EJ5O4JCWiRap3Rj1hfNxI2HSqhk8lK01rAylx5%252F9fHp6i%252FPRGYAGeegVo%252F%26spm%3D2014.12231445.1.0%26u%3D22t7218%26ref%3D%26et%3DjFBB1tzvZVjt5A%253D%253D
$url = 'http://www.chong4.com.cn/cydb/go.php?7218_29882_22t';$ch = curl_init();curl_setopt($ch, CURLOPT_URL, $url);curl_setopt($ch, CURLOPT_HEADER, true);curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);$content = curl_exec($ch);echo $content;得到