I wrote a simple method using cURL in PHP to get a remote file. I encountered a problem during the test:
That is, if you need to jump to get the actual file URL when getting the remote file, then Can't succeed in obtaining.
How to solve it?
See this web during the process of Google: After reading the URL of PHP CURL to get 301 or 302 )Set CURLOPT_FOLLOWLOCATION.
For option CURLOPT_FOLLOWLOCATION, please see:
http://hk.php.net/manual/en/function.curl-setopt.php
In addition, the main point of the above web discussion The problem is that the PHP settings of the local host caused the Curlopt_followLocation to be unavailable. The solution was proposed. The original focus was as follows:
The acquired DEFAULT SAFE and Default Open Basedir are off. The question is processed.