cURL
This article needs additional citations for verification. (November 2008) |
Stable release | 7.19.6
/ August 12, 2009 |
---|---|
Repository | |
Written in | C |
Operating system | Cross-platform |
Type | FTP client / HTTP client |
License | Free Software: MIT/X derivate license |
Website | http://curl.haxx.se/ |
In computing, cURL functions as a command-line tool for transferring files with URL syntax. Daniel Stenberg started writing cURL in 1997, as a way to transfer files more programmatically via protocols such as http, ftp, gopher, sftp, ftps, scp, tftp, and many more (13 in total), via a command-line interface. cURL supports a large number of data-transfer protocols (listed below). Distributed under the MIT License, cURL is free software.
Most cURL use involves automating unattended file-transfers or sequences of operations. For example, it is a good tool for simulating a user's actions at a web browser.
Users may incorporate libcurl
, the corresponding library/API into their programs; cURL acts as a stand-alone wrapper to the libcurl library. libcurl provides URL-based transfer capabilities to numerous applications ( open-source as well as proprietary).
Bindings in more than 30 languages are available for libcurl.
Examples
Basic use of cURL involves simply typing curl at the command line, followed by the URL of the output to retrieve.
To retrieve the example.com homepage, type:
curl www.example.com
cURL defaults to displaying the output it retrieves to the standard output specified on the system (usually the terminal window). So running the command above would, on most systems, display the www.example.com source-code in the terminal window.
cURL can write the output it retrieves to a file with the -o flag, thus:
curl -o example.html www.example.com
This will store the source code for www.example.com into a file named example.html. While retrieving output, cURL will display a progress-bar showing how much of the output has downloaded. Note however that cURL does not show a progress bar when preparing to display the output in the terminal window, since a progress-bar might interfere with the display of the output.
To download output to a file that has the same name as on the system it originates from, use the -O flag.
curl -O (URL)
This section needs expansion. You can help by adding to it. (October 2008) |
Supported protocols
Additional format support includes (among many other features):
- HTTPS certificates
- HTTP POST
- HTTP PUT
- FTP uploading
- Kerberos
- HTTP form based upload
- proxies
- cookies
- user+password authentication (Basic, Digest, NTLM, Negotiate for HTTP, and Kerberos 4 for FTP)
- File transfer resume
- HTTP proxy tunneling
Authors and copyright
Daniel Stenberg wrote cURL, with contributions from more than 600 named helpers; notable contributors include Dan Fandrich and Yang Tse. A THANKS
file in the distribution names all contributors, great and small.
The copyright of cURL belongs to Daniel Stenberg.