Opentopia Directory Encyclopedia Tools

Curl

Encyclopedia : C : CU : CUR : Curl


The correct title of this } is }}}. The initial letter is capitalized due to [Naming conventions #Lower case first lettertechnical restrictions].
For other uses, see Curl (disambiguation).
cURL is a command line tool for transferring files with URL syntax, supporting FTP, FTPS, HTTP, HTTPS, TFTP, Telnet, DICT, and LDAP. cURL supports HTTPS certificates, HTTP POST, HTTP PUT, FTP uploading, Kerberos, HTTP form based upload, proxies, cookies, user+password authentication (Basic, Digest, NTLM and Negotiate for HTTP and kerberos4 for FTP), file transfer resume, http proxy tunneling and many other features. cURL is open source/free software distributed under MIT License.

The main purpose and use for curl the command line tool is to automate unattended file transfers or sequences of operations. It is for example a good tool for simulating a user's actions at a web browser.

Libcurl is the corresponding library/API that users may incorporate into their programs. You may think of cURL as a stand-alone executable made out of the libcurl library. libcurl is being used to provide URL transfer capabilities to numerous applications, Open Source as well as many commercial ones.

More than 30 different bindings are available for libcurl.

Command-Line Example

On a computer running Unix (or a Unix-like operating system such as Linux, or a somewhat Unix-like compatibility layer such as Cygwin), the following command downloads the HTML source for the article you are reading, to a file curl.html in the current directory:


$ curl -o curl.html http://en.wikipedia.org/wiki/CURL
% Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
Dload  Upload   Total   Spent    Left  Speed
100 15167 0 15167 0 0 25473 0 --:--:-- --:--:-- --:--:-- 99258

For comparison, the equivalent procedure in a typical Web browser would be:

  1. Browse to the article.
  2. Select File | Save Page As...
  3. On the Save As dialog, navigate to the directory where you wish to save the page, and type a suitable filename in the File Name field.
Because the typical Web browser has a graphical user interface, it is difficult to automate with a script. The user would have to laboriously repeat the procedure for every file he or she wishes to download. The cURL command, on the other hand, is easy to automate with a script (for example, to download thousands of files from multiple Web sites), because it has a command line interface.

See also

Other File Transfer Programs

External links

 


From Wikipedia, the Free Encyclopedia. Original article here. Support Wikipedia by contributing or donating.
All text is available under the terms of the GNU Free Documentation License See Wikipedia Copyrights for details.

Search Titles
0123456789
ABCDEFGHIJ
KLMNOPQRST
UVWXYZ?

E-mail this article to:

Personal Message: