I cannot get webpage content using php, but I can access webpage content using a browser. what is the situation? According to the facts, we can infer what the problem is. 1. the server can normally access the target webpage using a browser. 2. the same website cannot be obtained using php. Test Code: & lt ;? Php $ a & nbsp; = & nbsp; file_get_contents (php cannot get the webpage content, but the browser can access the webpage content. what is the situation?
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:/img/2014/02/21/112105778 .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!
------ 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?