Patrick Monnerat c3e634d066 examples/chkspeed: improve portability 2 lat temu
..
.checksrc 2f72ad44fc checksrc: ban gmtime/localtime 4 lat temu
.gitignore ad9bc5976d copyright: make repository REUSE compliant 2 lat temu
10-at-a-time.c ad9bc5976d copyright: make repository REUSE compliant 2 lat temu
Makefile.am ad9bc5976d copyright: make repository REUSE compliant 2 lat temu
Makefile.example ad9bc5976d copyright: make repository REUSE compliant 2 lat temu
Makefile.inc 5357686fdf examples/curlx.c: remove 2 lat temu
Makefile.m32 5fd7cd7302 Makefile.m32: allow -nghttp3/-ngtcp2 without -ssl [ci skip] 2 lat temu
README.md fd1ce3d4b0 docs: spellfixes 2 lat temu
adddocsref.pl ad9bc5976d copyright: make repository REUSE compliant 2 lat temu
altsvc.c ad9bc5976d copyright: make repository REUSE compliant 2 lat temu
anyauthput.c ad9bc5976d copyright: make repository REUSE compliant 2 lat temu
cacertinmem.c ad9bc5976d copyright: make repository REUSE compliant 2 lat temu
certinfo.c ad9bc5976d copyright: make repository REUSE compliant 2 lat temu
chkspeed.c c3e634d066 examples/chkspeed: improve portability 2 lat temu
cookie_interface.c ad9bc5976d copyright: make repository REUSE compliant 2 lat temu
crawler.c 07a9b89fed examples/crawler.c: use the curl license 2 lat temu
curlgtk.c ad9bc5976d copyright: make repository REUSE compliant 2 lat temu
debug.c ad9bc5976d copyright: make repository REUSE compliant 2 lat temu
ephiperfifo.c ad9bc5976d copyright: make repository REUSE compliant 2 lat temu
evhiperfifo.c ad9bc5976d copyright: make repository REUSE compliant 2 lat temu
externalsocket.c ad9bc5976d copyright: make repository REUSE compliant 2 lat temu
fileupload.c ad9bc5976d copyright: make repository REUSE compliant 2 lat temu
ftp-wildcard.c ad9bc5976d copyright: make repository REUSE compliant 2 lat temu
ftpget.c ad9bc5976d copyright: make repository REUSE compliant 2 lat temu
ftpgetinfo.c ad9bc5976d copyright: make repository REUSE compliant 2 lat temu
ftpgetresp.c ad9bc5976d copyright: make repository REUSE compliant 2 lat temu
ftpsget.c ad9bc5976d copyright: make repository REUSE compliant 2 lat temu
ftpupload.c ad9bc5976d copyright: make repository REUSE compliant 2 lat temu
ftpuploadfrommem.c ad9bc5976d copyright: make repository REUSE compliant 2 lat temu
ftpuploadresume.c be43dd600a CURLOPT_SERVER_RESPONSE_TIMEOUT: the new name 2 lat temu
getinfo.c ad9bc5976d copyright: make repository REUSE compliant 2 lat temu
getinmemory.c ad9bc5976d copyright: make repository REUSE compliant 2 lat temu
getredirect.c ad9bc5976d copyright: make repository REUSE compliant 2 lat temu
getreferrer.c ad9bc5976d copyright: make repository REUSE compliant 2 lat temu
ghiper.c ad9bc5976d copyright: make repository REUSE compliant 2 lat temu
headerapi.c ad9bc5976d copyright: make repository REUSE compliant 2 lat temu
hiperfifo.c ad9bc5976d copyright: make repository REUSE compliant 2 lat temu
href_extractor.c ad9bc5976d copyright: make repository REUSE compliant 2 lat temu
htmltidy.c ad9bc5976d copyright: make repository REUSE compliant 2 lat temu
htmltitle.cpp ad9bc5976d copyright: make repository REUSE compliant 2 lat temu
http-post.c ad9bc5976d copyright: make repository REUSE compliant 2 lat temu
http2-download.c ad9bc5976d copyright: make repository REUSE compliant 2 lat temu
http2-pushinmemory.c ad9bc5976d copyright: make repository REUSE compliant 2 lat temu
http2-serverpush.c ad9bc5976d copyright: make repository REUSE compliant 2 lat temu
http2-upload.c ad9bc5976d copyright: make repository REUSE compliant 2 lat temu
http3-present.c ad9bc5976d copyright: make repository REUSE compliant 2 lat temu
http3.c ad9bc5976d copyright: make repository REUSE compliant 2 lat temu
httpcustomheader.c ad9bc5976d copyright: make repository REUSE compliant 2 lat temu
httpput-postfields.c 9eec75452c httpput-postfields.c: shorten string for C89 compliance 2 lat temu
httpput.c ad9bc5976d copyright: make repository REUSE compliant 2 lat temu
https.c ad9bc5976d copyright: make repository REUSE compliant 2 lat temu
imap-append.c ad9bc5976d copyright: make repository REUSE compliant 2 lat temu
imap-authzid.c ad9bc5976d copyright: make repository REUSE compliant 2 lat temu
imap-copy.c ad9bc5976d copyright: make repository REUSE compliant 2 lat temu
imap-create.c ad9bc5976d copyright: make repository REUSE compliant 2 lat temu
imap-delete.c ad9bc5976d copyright: make repository REUSE compliant 2 lat temu
imap-examine.c ad9bc5976d copyright: make repository REUSE compliant 2 lat temu
imap-fetch.c ad9bc5976d copyright: make repository REUSE compliant 2 lat temu
imap-list.c ad9bc5976d copyright: make repository REUSE compliant 2 lat temu
imap-lsub.c ad9bc5976d copyright: make repository REUSE compliant 2 lat temu
imap-multi.c ad9bc5976d copyright: make repository REUSE compliant 2 lat temu
imap-noop.c ad9bc5976d copyright: make repository REUSE compliant 2 lat temu
imap-search.c ad9bc5976d copyright: make repository REUSE compliant 2 lat temu
imap-ssl.c ad9bc5976d copyright: make repository REUSE compliant 2 lat temu
imap-store.c ad9bc5976d copyright: make repository REUSE compliant 2 lat temu
imap-tls.c ad9bc5976d copyright: make repository REUSE compliant 2 lat temu
makefile.dj ad9bc5976d copyright: make repository REUSE compliant 2 lat temu
multi-app.c ad9bc5976d copyright: make repository REUSE compliant 2 lat temu
multi-debugcallback.c ad9bc5976d copyright: make repository REUSE compliant 2 lat temu
multi-double.c ad9bc5976d copyright: make repository REUSE compliant 2 lat temu
multi-event.c ad9bc5976d copyright: make repository REUSE compliant 2 lat temu
multi-formadd.c ad9bc5976d copyright: make repository REUSE compliant 2 lat temu
multi-legacy.c ad9bc5976d copyright: make repository REUSE compliant 2 lat temu
multi-post.c ad9bc5976d copyright: make repository REUSE compliant 2 lat temu
multi-single.c ad9bc5976d copyright: make repository REUSE compliant 2 lat temu
multi-uv.c ad9bc5976d copyright: make repository REUSE compliant 2 lat temu
multithread.c ad9bc5976d copyright: make repository REUSE compliant 2 lat temu
opensslthreadlock.c ad9bc5976d copyright: make repository REUSE compliant 2 lat temu
parseurl.c ad9bc5976d copyright: make repository REUSE compliant 2 lat temu
persistent.c ad9bc5976d copyright: make repository REUSE compliant 2 lat temu
pop3-authzid.c ad9bc5976d copyright: make repository REUSE compliant 2 lat temu
pop3-dele.c ad9bc5976d copyright: make repository REUSE compliant 2 lat temu
pop3-list.c ad9bc5976d copyright: make repository REUSE compliant 2 lat temu
pop3-multi.c ad9bc5976d copyright: make repository REUSE compliant 2 lat temu
pop3-noop.c ad9bc5976d copyright: make repository REUSE compliant 2 lat temu
pop3-retr.c ad9bc5976d copyright: make repository REUSE compliant 2 lat temu
pop3-ssl.c ad9bc5976d copyright: make repository REUSE compliant 2 lat temu
pop3-stat.c ad9bc5976d copyright: make repository REUSE compliant 2 lat temu
pop3-tls.c ad9bc5976d copyright: make repository REUSE compliant 2 lat temu
pop3-top.c ad9bc5976d copyright: make repository REUSE compliant 2 lat temu
pop3-uidl.c ad9bc5976d copyright: make repository REUSE compliant 2 lat temu
post-callback.c ad9bc5976d copyright: make repository REUSE compliant 2 lat temu
postinmemory.c ad9bc5976d copyright: make repository REUSE compliant 2 lat temu
postit2-formadd.c ad9bc5976d copyright: make repository REUSE compliant 2 lat temu
postit2.c ad9bc5976d copyright: make repository REUSE compliant 2 lat temu
progressfunc.c ad9bc5976d copyright: make repository REUSE compliant 2 lat temu
resolve.c ad9bc5976d copyright: make repository REUSE compliant 2 lat temu
sendrecv.c ad9bc5976d copyright: make repository REUSE compliant 2 lat temu
sepheaders.c ad9bc5976d copyright: make repository REUSE compliant 2 lat temu
sessioninfo.c ad9bc5976d copyright: make repository REUSE compliant 2 lat temu
sftpget.c ad9bc5976d copyright: make repository REUSE compliant 2 lat temu
sftpuploadresume.c ad9bc5976d copyright: make repository REUSE compliant 2 lat temu
shared-connection-cache.c ad9bc5976d copyright: make repository REUSE compliant 2 lat temu
simple.c ad9bc5976d copyright: make repository REUSE compliant 2 lat temu
simplepost.c ad9bc5976d copyright: make repository REUSE compliant 2 lat temu
simplessl.c ad9bc5976d copyright: make repository REUSE compliant 2 lat temu
smooth-gtk-thread.c ad9bc5976d copyright: make repository REUSE compliant 2 lat temu
smtp-authzid.c ad9bc5976d copyright: make repository REUSE compliant 2 lat temu
smtp-expn.c ad9bc5976d copyright: make repository REUSE compliant 2 lat temu
smtp-mail.c ad9bc5976d copyright: make repository REUSE compliant 2 lat temu
smtp-mime.c ad9bc5976d copyright: make repository REUSE compliant 2 lat temu
smtp-multi.c ad9bc5976d copyright: make repository REUSE compliant 2 lat temu
smtp-ssl.c ad9bc5976d copyright: make repository REUSE compliant 2 lat temu
smtp-tls.c ad9bc5976d copyright: make repository REUSE compliant 2 lat temu
smtp-vrfy.c ad9bc5976d copyright: make repository REUSE compliant 2 lat temu
sslbackend.c ad9bc5976d copyright: make repository REUSE compliant 2 lat temu
synctime.c ad9bc5976d copyright: make repository REUSE compliant 2 lat temu
threaded-ssl.c ad9bc5976d copyright: make repository REUSE compliant 2 lat temu
url2file.c ad9bc5976d copyright: make repository REUSE compliant 2 lat temu
urlapi.c ad9bc5976d copyright: make repository REUSE compliant 2 lat temu
usercertinmem.c ad9bc5976d copyright: make repository REUSE compliant 2 lat temu
version-check.pl ad9bc5976d copyright: make repository REUSE compliant 2 lat temu
xmlstream.c ad9bc5976d copyright: make repository REUSE compliant 2 lat temu

README.md

libcurl examples

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 website.

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 do not 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.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 does not mean that the URLs work or that we expect you to actually torture our website 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.