PHP retrieves the URL jump link $ url =
Http://s.click.taobao.com/t? E = m % 3D2% 26 s % 3DNUvtFDcIwOocQipKwQzePOeEDrYVVa64LKpWJ % quit
Jump
$ Result =
Http://item.taobao.com/item.htm? Id = 23547888655 & ali_trackid = 2: mm_41992893_0_0: 1385292898_6k3_1991321817
$ Url is a promotion link obtained from Alimama. the content on his page is JS, and he jumps to $ result through JS. I want to get $ result through $ url, can php encapsulate this function?
Reply to discussion (solution)
You have to check its js jump code first, and then simulate it with php.
You have to check its js jump code first, and then simulate it with php.
I tried this method, but I didn't figure it out;
Is there any other method, such as curl, fsockopen, get_headers, file_get_contents? what can be used to implement other methods?
You have to check its js jump code first, and then simulate it with php.
I tried this method, but I didn't figure it out;
Is there any other method, such as curl, fsockopen, get_headers, file_get_contents? what can be used to implement other methods?
Try this, http://blog.segmentfault.com/pcp/1190000000341558.
Php curl
Set curl_setopt ($ ch, CURLOPT_HEADER, true );
Obtain Location by regular expression in the returned information: part
Preg_match ('/^ Location :(? P .*?) $/M', $ hmtl, $ match)
Location: the following address is the address after the jump.
Technical stickers, learning .....