cURL

From Wikipedia, the free encyclopedia

Jump to: navigation, search
cURL
Latest release 7.19.4 / 2009-03-03; 32 days ago
Written in C
Operating system Cross-platform
Type FTP client / HTTP client
License MIT/X derivate license
Website http://curl.haxx.se/

cURL is a command line tool for transferring files with URL syntax. The original author of cURL is Daniel Stenberg, who started the project 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 total), via a command line interface. The strong point of cURL is the number of data transfer protocols it supports (listed further down). Distributed under the MIT License, cURL is free software.

The main purpose and use for cURL is to automate unattended file transfers or sequences of operations. For example, it is 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; cURL acts as a stand-alone wrapper to the libcurl library. libcurl is used to provide URL transfer capabilities to numerous applications (open-source as well as proprietary).

Bindings in more than 30 languages are available for libcurl.

Contents

[edit] Example

Basic use of cURL involves simply typing curl at the command line, followed by the URL of the output you want to retrieve.

To retrieve the Wikipedia homepage, type:

curl www.wikipedia.org

cURL defaults to displaying the output it retrieves to the standard output specified on the system, which is usually the terminal window. So running the command above would, on most systems, display the www.wikipedia.org source code in the terminal window.

cURL can write the output it retrieves to a file with the -o flag.

curl -o wikipedia.html www.wikipedia.org

This will store the source code for www.wikipedia.org into a file named wikipedia.html. While retrieving output, cURL will display a progress bar showing how much of the output has been downloaded. Note however that cURL does not show a progress bar when it is going to display the output in the terminal window, since it is possible the progress bar would 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)

[edit] Supported protocols

Additional format support includes (and many other features):

[edit] Bindings in different programming languages to libcurl

Bindings in more than 30 languages are available for libcurl.

[edit] Authors and copyright

cURL is written by Daniel Stenberg with contributions from more than 600 named helpers, with Dan Fandrich and Yang Tse being two notable ones. There's a THANKS file in the distribution naming all contributors, big and small.

The copyright of cURL belongs to Daniel Stenberg. cURL is not part of any "umbrella" organization.

[edit] See also

[edit] External links

Personal tools