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 with p, but what happens when I can access the webpage content in a browser?
At last, this post was edited by u013067065 at 13:46:46 on February 3,. based on the facts, I will explain what the problem is.
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:/img/2014/01/04/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