cURL
From Wikipedia, the free encyclopedia
This article needs additional citations for verification. Please help improve this article by adding reliable references (ideally, using inline citations). Unsourced material may be challenged and removed. (November 2008) |
Latest release | 7.19.4 / 2009-03-03 |
---|---|
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)
This section requires expansion. |
[edit] Supported protocols
Additional format support includes (and 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
[edit] Bindings in different programming languages to libcurl
Bindings in more than 30 languages are available for libcurl.
- Ada95
- Basic
- C
- C++
- Ch
- Cocoa
- D
- Dylan
- Euphoria
- Ferite
- Gambas
- glib/GTK+
- Haskell
- ILE/RPG
- Java
- Lisp
- Lua
- Mono
- .NET
- Object-Pascal
- OCaml
- Pascal
- Perl
- PHP
- Postgres
- Python
- R
- Rexx
- Ruby
- Scheme
- S-Lang
- Smalltalk
- SP-Forth
- SPL
- Tcl
- Visual Basic
- Visual FoxPro
- Q
- wxWidgets
- XBLite
[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.