Switch branches/tags
Find file History
Permalink
..
Failed to load latest commit information.
.gitignore gitignore: ignore more generated files Mar 23, 2018
10-at-a-time.c code style: use spaces around pluses Sep 11, 2017
Makefile.am build: get CFLAGS (including -werror) used for examples and tests Mar 4, 2018
Makefile.example URLs: change all http:// URLs to https:// Feb 2, 2016
Makefile.inc docs/examples: add hiperfifo example using linux epoll/timerfd Jul 28, 2018
Makefile.m32 Makefile.m32: enable -W for MinGW32 build Jun 16, 2017
Makefile.netware spelling fixes Jun 3, 2018
README examples/README: cut out the incomplete list Nov 25, 2015
adddocsref.pl scripts: allow all perl scripts to be run directly Jan 7, 2018
anyauthput.c code style: use spaces around equals signs Sep 11, 2017
asiohiper.cpp asiohiper.cpp / evhiperfifo.c: deal with negative timerfunction input May 19, 2017
cacertinmem.c checksrc: make sure sizeof() is used *with* parentheses May 21, 2018
certinfo.c typecheck-gcc.h: check CURLINFO_CERTINFO Jun 1, 2017
chkspeed.c getinfo: add microsecond precise timers for various intervals May 17, 2018
cookie_interface.c cookie_interface: fix -Wcomma warning May 11, 2017
crawler.c examples/crawler.c: move #ifdef to column 0 Jul 11, 2018
curlgtk.c examples: adhere to curl code style Feb 11, 2016
curlx.c spelling fixes Jun 3, 2018
debug.c examples: fix -Wformat warnings Jul 9, 2018
ephiperfifo.c examples/ephiperfifo: checksrc compliance Jul 29, 2018
evhiperfifo.c all: Refactor malloc+memset to use calloc Apr 15, 2018
externalsocket.c examples/externalsocket.c: s/closesocket/closecb May 31, 2017
fileupload.c getinfo: add microsecond precise timers for various intervals May 17, 2018
fopen.c all: Refactor malloc+memset to use calloc Apr 15, 2018
ftp-wildcard.c examples: adhere to curl code style Feb 11, 2016
ftpget.c code style: use spaces around equals signs Sep 11, 2017
ftpgetinfo.c examples: adhere to curl code style Feb 11, 2016
ftpgetresp.c examples: adhere to curl code style Feb 11, 2016
ftpsget.c code style: use spaces around equals signs Sep 11, 2017
ftpupload.c spelling fixes Feb 23, 2018
ftpuploadfrommem.c examples: fixed too long line and too long string warnings May 1, 2017
ftpuploadresume.c examples/ftpuploadresume: checksrc compliance Aug 16, 2017
getinfo.c URLs: change all http:// URLs to https:// Feb 2, 2016
getinmemory.c examples: fix -Wformat warnings Jul 9, 2018
getredirect.c URLs: change all http:// URLs to https:// Feb 2, 2016
ghiper.c code style: use spaces around pluses Sep 11, 2017
hiperfifo.c all: Refactor malloc+memset to use calloc Apr 15, 2018
href_extractor.c examples: adhere to curl code style Feb 11, 2016
htmltidy.c code style: use spaces around equals signs Sep 11, 2017
htmltitle.cpp examples: make the C++ examples follow our code style too Jan 8, 2017
http-post.c URLs: change all http:// URLs to https:// Feb 2, 2016
http2-download.c examples: fix -Wformat warnings Jul 9, 2018
http2-serverpush.c examples: fix -Wformat warnings Jul 9, 2018
http2-upload.c examples: fix -Wformat warnings Jul 9, 2018
httpcustomheader.c URLs: change all http:// URLs to https:// Feb 2, 2016
httpput.c code style: use spaces around equals signs Sep 11, 2017
https.c URLs: change all http:// URLs to https:// Feb 2, 2016
imap-append.c examples/imap-append: Set size of data to be uploaded Sep 18, 2016
imap-copy.c spelling fixes Mar 26, 2017
imap-create.c spelling fixes Mar 26, 2017
imap-delete.c spelling fixes Mar 26, 2017
imap-examine.c spelling fixes Mar 26, 2017
imap-fetch.c examples: adhere to curl code style Feb 11, 2016
imap-list.c URLs: change all http:// URLs to https:// Feb 2, 2016
imap-lsub.c URLs: change all http:// URLs to https:// Feb 2, 2016
imap-multi.c code style: use spaces around pluses Sep 11, 2017
imap-noop.c URLs: change all http:// URLs to https:// Feb 2, 2016
imap-search.c spelling fixes Mar 26, 2017
imap-ssl.c examples: adhere to curl code style Feb 11, 2016
imap-store.c URLs: change all http:// URLs to https:// Feb 2, 2016
imap-tls.c examples: adhere to curl code style Feb 11, 2016
makefile.dj URLs: change all http:// URLs to https:// Feb 2, 2016
multi-app.c code style: use spaces around pluses Sep 11, 2017
multi-debugcallback.c examples: fix -Wformat warnings Jul 9, 2018
multi-double.c code style: use spaces around pluses Sep 11, 2017
multi-formadd.c examples: bring back curl_formadd-using examples Oct 3, 2017
multi-post.c form/mime: field names are not allowed to contain zero-valued bytes. Sep 22, 2017
multi-single.c examples: adhere to curl code style Feb 11, 2016
multi-uv.c checksrc: make sure sizeof() is used *with* parentheses May 21, 2018
multithread.c code style: use spaces around equals signs Sep 11, 2017
opensslthreadlock.c code style: use spaces around equals signs Sep 11, 2017
persistant.c URLs: change all http:// URLs to https:// Feb 2, 2016
pop3-dele.c URLs: change all http:// URLs to https:// Feb 2, 2016
pop3-list.c URLs: change all http:// URLs to https:// Feb 2, 2016
pop3-multi.c code style: use spaces around pluses Sep 11, 2017
pop3-noop.c URLs: change all http:// URLs to https:// Feb 2, 2016
pop3-retr.c URLs: change all http:// URLs to https:// Feb 2, 2016
pop3-ssl.c URLs: change all http:// URLs to https:// Feb 2, 2016
pop3-stat.c URLs: change all http:// URLs to https:// Feb 2, 2016
pop3-tls.c examples: adhere to curl code style Feb 11, 2016
pop3-top.c spelling fixes Mar 26, 2017
pop3-uidl.c URLs: change all http:// URLs to https:// Feb 2, 2016
post-callback.c examples/post-callback: use long for CURLOPT_POSTFIELDSIZE Sep 21, 2017
postinmemory.c code style: use spaces around equals signs Sep 11, 2017
postit2-formadd.c examples: bring back curl_formadd-using examples Oct 3, 2017
postit2.c form/mime: field names are not allowed to contain zero-valued bytes. Sep 22, 2017
progressfunc.c examples/progressfunc: make it build on older libcurls May 18, 2018
resolve.c URLs: change all http:// URLs to https:// Feb 2, 2016
rtsp.c examples/rtsp: fix error handling macros Dec 22, 2017
sampleconv.c examples/sampleconv.c: indent changes, made callbacks static May 31, 2017
sendrecv.c code style: use spaces around equals signs Sep 11, 2017
sepheaders.c examples: fix some compiler warnings Feb 11, 2016
sessioninfo.c examples: Fix format specifiers May 14, 2018
sftpget.c code style: use spaces around equals signs Sep 11, 2017
sftpuploadresume.c examples/sftpuploadresume: typecast fseek argument to long Apr 24, 2018
shared-connection-cache.c cleanup: misc typos in strings and comments Mar 16, 2018
simple.c URLs: change all http:// URLs to https:// Feb 2, 2016
simplepost.c code style: use spaces around equals signs Sep 11, 2017
simplessl.c code style: use spaces around equals signs Sep 11, 2017
smooth-gtk-thread.c code style: use spaces around equals signs Sep 11, 2017
smtp-expn.c URLs: change all http:// URLs to https:// Feb 2, 2016
smtp-mail.c examples/smtp-mail.c: use separate defines for options and mail Dec 12, 2017
smtp-mime.c spelling fixes Jun 3, 2018
smtp-multi.c code style: use spaces around pluses Sep 11, 2017
smtp-ssl.c examples/mime: minor example code fixes Sep 5, 2017
smtp-tls.c examples/mime: minor example code fixes Sep 5, 2017
smtp-vrfy.c URLs: change all http:// URLs to https:// Feb 2, 2016
sslbackend.c examples/sslbackend.c: fix failure of 'make checksrc' Aug 30, 2017
synctime.c code style: use spaces around pluses Sep 11, 2017
threaded-shared-conn.c spelling fixes Jun 3, 2018
threaded-ssl.c code style: use spaces around equals signs Sep 11, 2017
url2file.c examples/url2file.c: add missing curl_global_cleanup() call Jan 18, 2018
usercertinmem.c code style: use spaces around equals signs Sep 11, 2017
version-check.pl URLs: change all http:// URLs to https:// Feb 2, 2016
xmlstream.c examples/xmlstream.c: don't switch off CURL_GLOBAL_SSL Dec 1, 2017

README

                                  _   _ ____  _
                              ___| | | |  _ \| |
                             / __| | | | |_) | |
                            | (__| |_| |  _ <| |___
                             \___|\___/|_| \_\_____|

This directory is for libcurl programming examples. They are meant to show
some simple steps on how you can build your own application to take full
advantage of libcurl.

If you end up with other small but still useful example sources, please mail
them for submission in future packages and on the web site.

BUILDING

The Makefile.example is an example makefile that could be used to build these
examples. Just edit the file according to your system and requirements first.

Most examples should build fine using a command line like this:

  $ `curl-config --cc --cflags --libs` -o example example.c

Some compilers don't like having the arguments in this order but instead
want you do reorganize them like:

  $ `curl-config --cc` -o example example.c `curl-config --cflags --libs`

*PLEASE* do not use the curl.haxx.se site as a test target for your libcurl
applications/experiments. Even if some of the examples use that site as a URL
at some places, it doesn't mean that the URLs work or that we expect you to
actually torture our web site with your tests!  Thanks.

EXAMPLES

Each example source code file is designed to be and work stand-alone and
rather self-explanatory. The examples may at times lack the level of error
checks you need in a real world, but that is then only for the sake of
readability: to make the code smaller and easier to follow.