CURL
Encyclopedia
cURL is a computer software project providing a library and command-line tool for transferring data using various protocols. The cURL project produces two products, libcurl and cURL. It was first released in 1997.

libcurl

A free client-side URL transfer library, supporting FTP, FTPS
FTPS
FTPS is an extension to the commonly used File Transfer Protocol that adds support for the Transport Layer Security and the Secure Sockets Layer cryptographic protocols....

, Gopher, HTTP, HTTPS
Https
Hypertext Transfer Protocol Secure is a combination of the Hypertext Transfer Protocol with SSL/TLS protocol to provide encrypted communication and secure identification of a network web server...

, SCP
Secure copy
Secure Copy or SCP is a means of securely transferring computer files between a local and a remote host or between two remote hosts. It is based on the Secure Shell protocol....

, SFTP
SSH file transfer protocol
In computing, the SSH File Transfer Protocol is a network protocol that provides file access, file transfer, and file management functionality over any reliable data stream...

, TFTP
Trivial File Transfer Protocol
Trivial File Transfer Protocol is a file transfer protocol known for its simplicity. It is generally used forautomated transfer of configuration or boot files between machines in a local environment....

, Telnet
TELNET
Telnet is a network protocol used on the Internet or local area networks to provide a bidirectional interactive text-oriented communications facility using a virtual terminal connection...

, DICT
DICT
DICT is a dictionary network protocol created by the DICT Development Group. It is described by RFC 2229. Its goal is to surpass the Webster protocol and to allow clients to access more dictionaries during use...

, the file URI scheme
File URI scheme
The file URI scheme is a URI scheme specified in RFC 1630 and RFC 1738, typically used to retrieve files from within one's own computer.- Format :A file URL takes the form of file://host/path...

, LDAP, LDAPS, IMAP, POP3, SMTP and RTSP. The library supports HTTPS certificates, HTTP POST, HTTP PUT, FTP uploading, Kerberos, HTTP form based upload, proxies, cookies, user-plus-password authentication, file transfer resume, and HTTP proxy tunneling.

The libcurl library is portable. It builds and works identically on several platforms, including Solaris, NetBSD, FreeBSD, OpenBSD, Darwin, HPUX, IRIX, AIX, Tru64, Linux, UnixWare, HURD, Windows, Symbian, Amiga, OS/2, BeOS, Mac OS X, Ultrix, QNX, OpenVMS, RISC OS, Novell NetWare, DOS and more.

The libcurl library is free, thread-safe, IPv6
IPv6
Internet Protocol version 6 is a version of the Internet Protocol . It is designed to succeed the Internet Protocol version 4...

 compatible, and fast. Bindings
Language binding
In computing, a binding from a programming language to a library or OS service is an API providing that service in the language.Many software libraries are written in systems programming languages such as C or C++...

 in more than 40 languages are available for libcurl.

cURL

A command line tool for getting or sending files using URL syntax.

Since cURL uses libcurl, it supports a range of common Internet protocols, currently including HTTP, HTTPS, FTP, FTPS, SCP, SFTP, TFTP, LDAP, LDAPS, DICT, TELNET, FILE . IMAP, POP3, SMTP and RTSP (the last four-only in versions newer than 7.20.0 or 9 February 2010).

The name of the project is a play on 'Client for URLs', originally with URL spelled in uppercase to make it obvious that it deals with URLs. The fact it can also be pronounced 'see URL' also helped; it works as an abbreviation for "Client URL Request Library" or the recursive version: "Curl URL Request Library".

Daniel Stenberg started writing cURL in 1997, as a way to transfer files via protocols such as http, ftp, gopher, and many more, via a command-line interface. Several other people made
important and crucial contributions to the project. Distributed under the MIT License
MIT License
The MIT License is a free software license originating at the Massachusetts Institute of Technology . It is a permissive license, meaning that it permits reuse within proprietary software provided all copies of the licensed software include a copy of the MIT License terms...

, cURL is free software
Free software
Free software, software libre or libre software is software that can be used, studied, and modified without restriction, and which can be copied and redistributed in modified or unmodified form either without restriction, or with restrictions that only ensure that further recipients can also do...

.

Examples of cURL use from command line

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
Example.com
Example.com, example.net, example.org, and example.edu are second-level domain names reserved for documentation purposes and examples of the use of domain names....

 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 is likely to 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, for example:
curl -O www.example.com/example.html

See also

  • Wget
    Wget
    GNU Wget is a computer program that retrieves content from web servers, and is part of the GNU Project. Its name is derived from World Wide Web and get...

  • Web crawler
    Web crawler
    A Web crawler is a computer program that browses the World Wide Web in a methodical, automated manner or in an orderly fashion. Other terms for Web crawlers are ants, automatic indexers, bots, Web spiders, Web robots, or—especially in the FOAF community—Web scutters.This process is called Web...

  • curl-loader
    Curl-loader
    curl-loader is an open-source software performance testing tool written in the C programming language.- Features :curl-loader is capable of simulating application behavior of hundreds of thousands of HTTP/HTTPS and FTP/FTPS clients, each with its own source IP-address...

     - an open-source testing tool based on cURL
  • libwww
    Libwww
    libwww is a highly-modular client-side web API for Unix and Windows, and is also the name of the reference implementation of this API....


External links

The source of this article is wikipedia, the free encyclopedia.  The text of this article is licensed under the GFDL.
 
x
OK