In Baidu Encyclopedia, curl is a file transfer tool that uses the URL syntax to work in the command line mode. Supports many protocols: FTP, FTPS, HTTP, HTTPS, GOPHER, TELNET, DICT, FILE, and LDAP.
Before proceeding to today's topic, let's briefly introduce CRUL.
In Baidu Encyclopedia, curl is a file transfer tool that uses the URL syntax to work in the command line mode. Supports many protocols: FTP, FTPS, HTTP, HTTPS, GOPHER, TELNET, DICT, FILE, and LDAP. (See http://baike.baidu.com/view/1326315.htm)
Here, I will add some functions that CRUL can implement for us: remote retrieval and collection of content, FTP upload and download for PHP web edition, simulated login, and interface connection (API ), data transmission to simulate cookies.
Next, let's start with the simplest remote access to webpage content. if you don't talk about it, paste the code directly:
If an error occurs when running the code, check php. ini to make sure that the CURL extension component is enabled.