I cannot get webpage content using php, but I can access webpage content using a browser. what is the situation? How to deal with it-php Tutorial

Source: Internet
Author: User
I cannot get webpage content using php, but I can access webpage content using a browser. what is the situation? This post was last written by u013067065 at 2014-01-0313: 46: 46. edit the question according to the facts. 1. the server can access the target webpage normally using a browser. 2. the same URL cannot be obtained using php. Test Code: & lt ;? Php $ a & nbsp; fil cannot obtain webpage content with php, but can access webpage content with a browser. what is the situation?

This post was last edited by u013067065 at 13:46:46 on

What is the problem based on facts?
1. the server can access the target webpage through a browser.
2. php cannot obtain the webpage content for the same website.

Test code:

$ A = file_get_contents ('Destination website ');
Var_dump ($ );
?>


The result is as follows:



Clearer Picture: http://www.daimami.com/img/2014/01/07/222915183.jpg

In any case, you can always get a piece of js. This section of js seems to be responsible for turning.



In addition, this code seems to be dynamic. every time the function name variable name changes dynamically, it should be automatically generated by some software.


3. for the same program code, other servers can normally obtain the webpage content of the target website.

Based on the above facts, we can infer what went wrong?

What are the server-specific restrictions on the target website? Or server configuration problems? Please answer!

Share: More


------ Solution --------------------
Js code returns results only after it is run.
You only obtained the js code but didn't run it. how can you get the result?

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.