1. libcurl Library
The main function is to connect and communicate with different servers through different protocols ~ That is to say, sockPHP supports libcurl (which allows you to connect to and communicate with different servers using 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, HTTP basic form upload, proxy, cookies, and user authentication.
Second, an error is reported when libcurl is added to ios;
Undefined symbols for architecture i386:
"_ Inflate", referenced from:
_ Inflate_stream in libcurl. a (libcurl_la-content_encoding.o)
"_ InflateEnd", referenced from:
_ Inflate_stream in libcurl. a (libcurl_la-content_encoding.o)
_ Curl_unencode_gzip_write in libcurl. a (libcurl_la-content_encoding.o)
_ Curl_unencode_cleanup in libcurl. a (libcurl_la-content_encoding.o)
"_ InflateInit2 _", referenced from:
_ Inflate_stream in libcurl. a (libcurl_la-content_encoding.o)
_ Curl_unencode_gzip_write in libcurl. a (libcurl_la-content_encoding.o)
"_ InflateInit _", referenced from:
_ Curl_unencode_deflate_write in libcurl. a (libcurl_la-content_encoding.o)
"_ ZlibVersion", referenced from:
_ Curl_unencode_gzip_write in libcurl. a (libcurl_la-content_encoding.o)
Ld: symbol (s) not found for architecture i386
Clang: error: linker command failed with exit code 1 (use-v to see invocation)
Solution:
Add to database: libz. dylib
Explanation of this database:
1. dylib indicates that this is a dynamic link library.
2. libz. dylib is a library that provides zip compression and decompression.
3. For the library interface, # import "zlib. h"