PHP get URL after jump link

Source: Internet
Author: User
$url =
http://s.click.taobao.com/t?e=m%3D2%26s%3DNUvtFDcIwOocQipKwQzePOeEDrYVVa64LKpWJ% 2bin0xjradhuf14fmr8wzheppgyi8svium61dt3fihka92r7zcnjyd38oaemguafy6v5pipjbfxotquef4wnvsvnnsb8
Jump to
$result =
http://item.taobao.com/item.htm?id=23547888655&ali_trackid=2:mm_41992893_0_0:1385292898_6k3_1991321817

$url is from Ali mother to get the promotion link, his page content is JS, he jumped to the $result through JS, I want to get $result by using the text, PHP can encapsulate this function?


Reply to discussion (solution)


Then you have to look at its JS jump code, after using PHP simulation.

Then you have to look at its JS jump code, after using PHP simulation.

I tried this method, but I didn't get it.

Is there any other way, for example, curl, Fsockopen, Get_headers, File_get_contents, others, with what can be achieved?



Then you have to look at its JS jump code, after using PHP simulation.

I tried this method, but I didn't get it.

Is there any other way, for example, curl, Fsockopen, Get_headers, File_get_contents, others, with what can be achieved?

Then try this, http://blog.segmentfault.com/pcp/1190000000341558.

PHP Curl
Set curl_setopt ($ch, Curlopt_header, true);
Return information in the regular access location: part
Preg_match ('/^location: (? P . *?) $/m ', $HMTL, $match)
Location: The following address is the post-jump address.

Technology stickers,,,, learned .....

  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.