The main function of Libcurl is to connect and communicate different servers with different protocols-that is, the sockphp support Libcurl (which allows you to connect and communicate with different servers in different protocols). , Libcurl currently supports HTTP, HTTPS, FTP, Gopher, Telnet, dict, file, and LDAP protocols. Libcurl also supports HTTPS certificate authorization, HTTP POST, HTTP put, FTP upload (of course you can also use PHP FTP extensions), HTTP basic form uploads, proxies, cookies, and user authentication.
1.vs2013 compile libcurl7.49.1 steps (see ref. 1 for detailed steps)
A. Download ActivePerl (installed by default)
Download Address: Http://rj.baidu.com/soft/detail/14792.html?ald
B. Download and compile openssl1.0.1i
Download Address: https://www.openssl.org/source/
(1) Extract the source package, according to the source directory under the Install.win32 file to compile
(2) VS2013 command line into the OpenSSL source root directory
(3) Perl Configure vc-win32 no-asm--prefix=d:/program_files/openssl/
(4) Ms\do_ms.bat
(5) Nmake-f Ms\ntdll.mak
(6) Nmake-f Ms\ntdll.mak test (test passes will prompt Passall tests)
(7) Nmake-f Ms\ntdll.mak Install
(8) Generate files in the D:\Program_Files\openssl directory
C. Download and compile zlib1.2.8
Download Address: http://www.zlib.net/
(1) Extract source package
(2) vs2013 command line into the contrib\masmx86 directory, run Bld_ml32.bat
(3) vs2013 command line switch to source root directory
(4) nmake-f win32/makefile.msc loc= "-dasmv-dasminf" obja= "Match686.obj inffas32.obj"
(5) Generate files in source root directory D. Establish Deps directory
Deps directories and Libcurl siblings, where OpenSSL and zlib headers and lib files are stored (OpenSSL related files are stored under D:\Program_Files\openssl, zlib related files under zlib root directory)
Deps Directory
Deps Download Address: http://download.csdn.net/detail/hei_ya/9546254
E. Compiling libcurl7.49.1
Download Address: https://curl.haxx.se/download.html
(1) Access to the Winbuild directory under the source directory
(2) nmake/f makefile.vc mode=dll With_ssl=dll With_zlib=dll
(3) The generated files are in the Builds\libcurl-vc-x86-release-dll-zlib-dll-ipv6-sspi-winssl directory
2.LibCurl Programming Introduction
The process of using Libcurl to complete the transfer task:
1. Invoke Curl_global_init () initialize Libcurl 2. Call the Curl_easy_init () function to get easy interface pointer 3. Call CURL_EASY_SETOPT Set transport options 4. According to Curl_ Easy_setopt set the transfer option to implement the callback function to complete the user-specific task 5. Call the Curl_easy_perform () function to complete the transfer task 6. Call Curl_easy_cleanup () free memory
Reference documents:
"1" HTTP://WWW.TUICOOL.COM/ARTICLES/VNRZEBQ
"2" http://www.cnblogs.com/lidabo/p/4583061.html
"3" http://baike.baidu.com/link?url=k3irgwbm9y5hsszvajcdter_5e1yj9irgkj4x0fwgp0x6ja5o9idmeli- J7hiqywwm6-vib-7bbkawyxsjcobq