淘宝采集跳转该如何采集跳转后的url
Jun 13, 2016 pm 01:14 PM
淘宝采集跳转该怎么采集跳转后的url
采集$tmpurl="http://s.click.taobao.com/t_8?e=7HZ6jHSTbIWZXoQ43%2BGOC2vGvlT28S6knArdy2HkZM%2BsVw%3D%3D&p=mm_32165125_0_0";
淘宝会自动跳转$url地址:http://item.taobao.com/item.htm?id=15711538808&ali_trackid=2:mm_32165125_0_0:1346999816_310_551572511
怎样才能获取到跳转后的$url,请帖详细代码
请用我给的url测试,谢谢
------解决方案--------------------
A.代码加上 cookie(我不确定要还是不要,我测试的时候写了)
B.代码加上 我上面要求的 curl_setopt($ch, CURLOPT_FOLLOWLOCATION,true)
C.抓取结果内的 以下范例地址
http://dsc.taobaocdn.com/i2/150/110/15711538808/T1xk6KXatfXXcWeqbX.desc%7Cvar%5Edesc%3Bsign%5Ee25bc908cafba19c219353a66bcce7b4%3Blang%5Egbk%3Bt%5E1346995853
D.爬上面的地址 取得宝贝描述内容
E.输出
多年前就写过这些东西了,淘宝还是没啥变化.代码先自己写吧...我只是分析到了 C部分.不过剩下的已经不是什么问题了。

Hot Article

Hot tools Tags

Hot Article

Hot Article Tags

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics

Why NameResolutionError(self.host, self, e) from e and how to solve it

How to use Nginx Proxy Manager to implement automatic jump from HTTP to HTTPS

Understand common application scenarios of web page redirection and understand the HTTP 301 status code

Quick Application: Practical Development Case Analysis of PHP Asynchronous HTTP Download of Multiple Files

What is the difference between html and url
