The aspx page will jump to, how does PHP file_get_content () perform tracking collection?

Source: Internet
Author: User
The aspx page will jump. how does PHP file_get_content () perform tracking collection? Search for the keyword "39000038", www. shortname. cnSearchRefine. aspx? Keyword3921338 because there is only one, the page will automatically jump to the www. shortname. cnProductDetailMolex39-00-0038 aspx page will jump, PHP how file_get_content () for tracking collection?
Search for the keyword "39000038 」,
Http://www.mouser.cn/Search/Refine.aspx? Keyword = 39000038
Because there is only one, the page will automatically jump
Http://www.mouser.cn/ProductDetail/Molex/39-00-0038? Qs = % 2fha2pyFaduicta8SJW6uUsrinUHZLSGN9RfyeL103Gs % 3d

Search for the keyword "3900003". multiple products are a list.
Http://www.mouser.cn/Search/Refine.aspx? Keyword = 3900003

I want to know, it is directly in. net to determine and then jump, or use js to determine the jump

I want to use the file_get_content () function of php to capture
Http://www.mouser.cn/Search/Refine.aspx? Keyword = 39000038
How to track
Http://www.mouser.cn/ProductDetail/Molex/39-00-0038? Qs = % 2fha2pyFaduicta8SJW6uUsrinUHZLSGN9RfyeL103Gs % 3d
------ Solution --------------------
File_get_contents cannot do this.
function curl_get($durl) {
$t = parse_url($durl);
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL,$durl);
curl_setopt($ch, CURLOPT_TIMEOUT,5);
curl_setopt($ch, CURLOPT_USERAGENT, $_SERVER['HTTP_USER_AGENT']);
curl_setopt($ch, CURLOPT_REFERER, "http://$t[host]/");
curl_setopt($ch, CURLOPT_RETURNTRANSFER,1);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
$r = curl_exec($ch);
curl_close($ch);
return $r;
}

echo curl_get( 'http://www.mouser.cn/Search/Refine.aspx?Keyword=39000038');

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.