curl(), file_get_contents(), and snoopy.class.php are three tools used in remote page crawling or collection.
I still prefer to use snoopy.class.php because it is more efficient and No server-specific configuration support is required, and it can be used in ordinary virtual hosts;
file_get_contents() is slightly less efficient, and in common failure situations, curl() is very efficient and supports multi-threading, but the curl extension needs to be turned on.
The following are the steps to enable the curl extension:
1. Copy the three files php_curl.dll, libeay32.dll, and ssleay32.dll under the PHP folder to system32;
2. Remove the semicolon in extension=php_curl.dll in php.ini (c:WINDOWS directory);
3. Restart apache or IIS.
The above introduces wecenter-enable CURL extension, so that the server supports remote collection of PHP curl function, including the content. I hope it will be helpful to friends who are interested in PHP tutorials.