Libraries
Articles

Libcurl

From Libzter

Share/Save/Bookmark
Jump to: navigation, search


libcURL

Developer(s)cURL Team (orig. Daniel Stenberg)
Initial Release1998
Current Version7.20.1
Language(s)C
Licence(s)MIT
Platform(s)Multi Platform

Contents

[edit] Overview

libcurl is a URL transfer library. It is used to transfer data by a set of featured protocols.

[edit] Example

This code downloads the front page of sourceforge.net using HTTPS.

#include <stdio.h>
#include <curl/curl.h>
int main(int argc, char** argv){
 CURL* curl;
 CURLcode res;
 curl = curl_easy_init();
 if( curl ){
 // URL to retreive     curl_easy_setopt(curl,CURLOPT_URL,"https://sourceforge.net/");
  // Skip Certificate verification (on, for instance, self signed certificates..)
  // curl_easy_setopt(curl, CURLOPT_SSL_VERIFYPEER, 0L);
  // Skip hostname, if the connection is to some other hostname than the certificate
  // curl_easy_setopt(curl, CURLOPT_SSL_VERIFYHOST, 0L);
  res = curl_easy_perform(curl);
  curl_easy_cleanup(curl);
  return 0;
};

[edit] Supported protocols

  • File transfer
    • FTP (including upload)
    • FTPS
    • SFTP
    • TFTP
    • SCP
  • Hyper text
    • HTTP (including POST and PUT)
    • HTTPS (including SSL certificates)
  • Directory
    • LDAP
    • LDAPS
    • DICT
  • Generic/Access
    • TELNET
    • RTSP
  • Mail
    • IMAP
    • SMTP
    • POP3

[edit] Features

  • Thread safe
  • IPv6
  • Authentication (Basic, digest, NTLM, Negiotiate, Kerberos4)
  • HTTP Tunneling
  • Proxies
  • Cookies

[edit] Platforms

  • UNIX
    • Solaris
    • NetBSD, FreeBSD, OpenBSD
    • HPUX
    • IRIX
    • AIX
    • Tru64
    • UnixWare
    • Mac OS X,Darwin
    • Ultrix
  • Other
    • Linux
    • HURD
    • Amiga
    • Windows
    • OS/2
    • OpenVMS
    • QNX
    • RISC OS
    • Novell NetWare
    • DOS
    • etc.

[edit] Languages

Main API is in plain C. However, bindings exists. C++, Java, .NET, PHP, Ruby, Cocoa, Perl, Python and many more. libcurl bindings

[edit] Links

Website and documentation


Library Navigation

  • Language

  • Category
Google AdSense