Home >Backend Development >PHP Tutorial >Turn on the CURL extension and let the server support the PHP curl function (remote collection)_PHP tutorial

Turn on the CURL extension and let the server support the PHP curl function (remote collection)_PHP tutorial

WBOY
WBOYOriginal
2016-07-21 15:31:20900browse

Curl(), file_get_contents(), and snoopy.class.php are three tools used in remote page crawling or collection. Snoopy.class.php is still used because it is more efficient and does not require a server. Specific configuration support can be used in ordinary virtual hosts. File_get_contents() is slightly less efficient. In common failure situations, curl() is very efficient. It supports multi-threading, but the curl extension needs to be enabled. The following are the steps to enable the curl extension:

1. Copy the three files php_curl.dll, libeay32.dll, 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.

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/323060.htmlTechArticlecurl(), file_get_contents(), snoopy.class.php are used in crawling or collecting three remote pages Among the tools available, I still prefer to use snoopy.class.php because it is more efficient and does not require...
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn