James Fuller 97394caa20 example/maxconnects: set maxconnect example 1 rok temu
..
.checksrc 2f72ad44fc checksrc: ban gmtime/localtime 4 lat temu
.gitignore 2bc1d775f5 copyright: update all copyright lines and remove year ranges 1 rok temu
10-at-a-time.c 2bc1d775f5 copyright: update all copyright lines and remove year ranges 1 rok temu
Makefile.am 2bc1d775f5 copyright: update all copyright lines and remove year ranges 1 rok temu
Makefile.example 2bc1d775f5 copyright: update all copyright lines and remove year ranges 1 rok temu
Makefile.inc 97394caa20 example/maxconnects: set maxconnect example 1 rok temu
Makefile.mk 2bc1d775f5 copyright: update all copyright lines and remove year ranges 1 rok temu
README.md 2bc1d775f5 copyright: update all copyright lines and remove year ranges 1 rok temu
adddocsref.pl 2bc1d775f5 copyright: update all copyright lines and remove year ranges 1 rok temu
altsvc.c 2bc1d775f5 copyright: update all copyright lines and remove year ranges 1 rok temu
anyauthput.c 2bc1d775f5 copyright: update all copyright lines and remove year ranges 1 rok temu
cacertinmem.c 2bc1d775f5 copyright: update all copyright lines and remove year ranges 1 rok temu
certinfo.c 2bc1d775f5 copyright: update all copyright lines and remove year ranges 1 rok temu
chkspeed.c 2bc1d775f5 copyright: update all copyright lines and remove year ranges 1 rok temu
connect-to.c 67ebc0d5b0 example/connect-to: show CURLOPT_CONNECT_TO 1 rok temu
cookie_interface.c 2bc1d775f5 copyright: update all copyright lines and remove year ranges 1 rok temu
crawler.c aef74ae416 example/crawler: make it use a few more options 1 rok temu
debug.c 2bc1d775f5 copyright: update all copyright lines and remove year ranges 1 rok temu
default-scheme.c c6ec264d1f example/default-scheme: set the default scheme for schemeless URLs 1 rok temu
ephiperfifo.c 2bc1d775f5 copyright: update all copyright lines and remove year ranges 1 rok temu
evhiperfifo.c 2bc1d775f5 copyright: update all copyright lines and remove year ranges 1 rok temu
externalsocket.c 2bc1d775f5 copyright: update all copyright lines and remove year ranges 1 rok temu
fileupload.c 2bc1d775f5 copyright: update all copyright lines and remove year ranges 1 rok temu
ftp-wildcard.c 2bc1d775f5 copyright: update all copyright lines and remove year ranges 1 rok temu
ftpget.c 2bc1d775f5 copyright: update all copyright lines and remove year ranges 1 rok temu
ftpgetinfo.c 2bc1d775f5 copyright: update all copyright lines and remove year ranges 1 rok temu
ftpgetresp.c 2bc1d775f5 copyright: update all copyright lines and remove year ranges 1 rok temu
ftpsget.c 2bc1d775f5 copyright: update all copyright lines and remove year ranges 1 rok temu
ftpupload.c 2bc1d775f5 copyright: update all copyright lines and remove year ranges 1 rok temu
ftpuploadfrommem.c 2bc1d775f5 copyright: update all copyright lines and remove year ranges 1 rok temu
ftpuploadresume.c 67e9e90f96 examples/ftpuploadresume.c: add use of CURLOPT_ACCEPTTIMEOUT_MS 1 rok temu
getinfo.c 2bc1d775f5 copyright: update all copyright lines and remove year ranges 1 rok temu
getinmemory.c 2bc1d775f5 copyright: update all copyright lines and remove year ranges 1 rok temu
getredirect.c 2bc1d775f5 copyright: update all copyright lines and remove year ranges 1 rok temu
getreferrer.c 2bc1d775f5 copyright: update all copyright lines and remove year ranges 1 rok temu
ghiper.c 2bc1d775f5 copyright: update all copyright lines and remove year ranges 1 rok temu
headerapi.c 2bc1d775f5 copyright: update all copyright lines and remove year ranges 1 rok temu
hiperfifo.c 2bc1d775f5 copyright: update all copyright lines and remove year ranges 1 rok temu
href_extractor.c 2bc1d775f5 copyright: update all copyright lines and remove year ranges 1 rok temu
hsts-preload.c e6ad624996 example/hsts-preload: show one way to HSTS preload 1 rok temu
htmltidy.c 2bc1d775f5 copyright: update all copyright lines and remove year ranges 1 rok temu
htmltitle.cpp 127eb0d83a misc: fix spelling mistakes 1 rok temu
http-options.c 4e6a07e177 examples/http-options: show how to send "OPTIONS *" 1 rok temu
http-post.c 2bc1d775f5 copyright: update all copyright lines and remove year ranges 1 rok temu
http2-download.c ad8a8e048e example/http2-download: set CURLOPT_BUFFERSIZE 1 rok temu
http2-pushinmemory.c 2bc1d775f5 copyright: update all copyright lines and remove year ranges 1 rok temu
http2-serverpush.c acd82c8bfd tests/http: more tests with specific clients 1 rok temu
http2-upload.c 2bc1d775f5 copyright: update all copyright lines and remove year ranges 1 rok temu
http3-present.c 2bc1d775f5 copyright: update all copyright lines and remove year ranges 1 rok temu
http3.c 49a9f13c39 examples/http3.c: use CURL_HTTP_VERSION_3 1 rok temu
httpcustomheader.c 2bc1d775f5 copyright: update all copyright lines and remove year ranges 1 rok temu
httpput-postfields.c 2bc1d775f5 copyright: update all copyright lines and remove year ranges 1 rok temu
httpput.c 127eb0d83a misc: fix spelling mistakes 1 rok temu
https.c 555bacd6d5 examples/https.c: use CURLOPT_CA_CACHE_TIMEOUT 1 rok temu
imap-append.c 22c92a6d51 docs: use a space after RFC when spelling out RFC numbers 1 rok temu
imap-authzid.c 2bc1d775f5 copyright: update all copyright lines and remove year ranges 1 rok temu
imap-copy.c 2bc1d775f5 copyright: update all copyright lines and remove year ranges 1 rok temu
imap-create.c 2bc1d775f5 copyright: update all copyright lines and remove year ranges 1 rok temu
imap-delete.c 2bc1d775f5 copyright: update all copyright lines and remove year ranges 1 rok temu
imap-examine.c 2bc1d775f5 copyright: update all copyright lines and remove year ranges 1 rok temu
imap-fetch.c 2bc1d775f5 copyright: update all copyright lines and remove year ranges 1 rok temu
imap-list.c 2bc1d775f5 copyright: update all copyright lines and remove year ranges 1 rok temu
imap-lsub.c 2bc1d775f5 copyright: update all copyright lines and remove year ranges 1 rok temu
imap-multi.c 2bc1d775f5 copyright: update all copyright lines and remove year ranges 1 rok temu
imap-noop.c 2bc1d775f5 copyright: update all copyright lines and remove year ranges 1 rok temu
imap-search.c 2bc1d775f5 copyright: update all copyright lines and remove year ranges 1 rok temu
imap-ssl.c 2bc1d775f5 copyright: update all copyright lines and remove year ranges 1 rok temu
imap-store.c 2bc1d775f5 copyright: update all copyright lines and remove year ranges 1 rok temu
imap-tls.c 2bc1d775f5 copyright: update all copyright lines and remove year ranges 1 rok temu
ipv6.c fdfc2bb6be examples/ipv6: disable on win32 1 rok temu
maxconnects.c 97394caa20 example/maxconnects: set maxconnect example 1 rok temu
multi-app.c 2bc1d775f5 copyright: update all copyright lines and remove year ranges 1 rok temu
multi-debugcallback.c b5351c71c1 examples/multi-debugcallback.c: avoid the bool typedef 1 rok temu
multi-double.c 2bc1d775f5 copyright: update all copyright lines and remove year ranges 1 rok temu
multi-event.c 2bc1d775f5 copyright: update all copyright lines and remove year ranges 1 rok temu
multi-formadd.c 2bc1d775f5 copyright: update all copyright lines and remove year ranges 1 rok temu
multi-legacy.c 6f93d5f604 lib: fix conversion warnings with gcc on macOS 1 rok temu
multi-post.c 2bc1d775f5 copyright: update all copyright lines and remove year ranges 1 rok temu
multi-single.c 2bc1d775f5 copyright: update all copyright lines and remove year ranges 1 rok temu
multi-uv.c 2bc1d775f5 copyright: update all copyright lines and remove year ranges 1 rok temu
multithread.c 2bc1d775f5 copyright: update all copyright lines and remove year ranges 1 rok temu
parseurl.c f198d33e8d checksrc: disallow spaces before labels 1 rok temu
persistent.c 2bc1d775f5 copyright: update all copyright lines and remove year ranges 1 rok temu
pop3-authzid.c 2bc1d775f5 copyright: update all copyright lines and remove year ranges 1 rok temu
pop3-dele.c 2bc1d775f5 copyright: update all copyright lines and remove year ranges 1 rok temu
pop3-list.c 2bc1d775f5 copyright: update all copyright lines and remove year ranges 1 rok temu
pop3-multi.c 2bc1d775f5 copyright: update all copyright lines and remove year ranges 1 rok temu
pop3-noop.c 2bc1d775f5 copyright: update all copyright lines and remove year ranges 1 rok temu
pop3-retr.c 2bc1d775f5 copyright: update all copyright lines and remove year ranges 1 rok temu
pop3-ssl.c 2bc1d775f5 copyright: update all copyright lines and remove year ranges 1 rok temu
pop3-stat.c 2bc1d775f5 copyright: update all copyright lines and remove year ranges 1 rok temu
pop3-tls.c 2bc1d775f5 copyright: update all copyright lines and remove year ranges 1 rok temu
pop3-top.c 2bc1d775f5 copyright: update all copyright lines and remove year ranges 1 rok temu
pop3-uidl.c 2bc1d775f5 copyright: update all copyright lines and remove year ranges 1 rok temu
post-callback.c 2bc1d775f5 copyright: update all copyright lines and remove year ranges 1 rok temu
postinmemory.c 2bc1d775f5 copyright: update all copyright lines and remove year ranges 1 rok temu
postit2-formadd.c 22c92a6d51 docs: use a space after RFC when spelling out RFC numbers 1 rok temu
postit2.c 22c92a6d51 docs: use a space after RFC when spelling out RFC numbers 1 rok temu
progressfunc.c 2bc1d775f5 copyright: update all copyright lines and remove year ranges 1 rok temu
protofeats.c c9cff9262f docs/examples/protofeats.c: Outputs all protocols and features 1 rok temu
resolve.c 2bc1d775f5 copyright: update all copyright lines and remove year ranges 1 rok temu
sendrecv.c 6f93d5f604 lib: fix conversion warnings with gcc on macOS 1 rok temu
sepheaders.c 2bc1d775f5 copyright: update all copyright lines and remove year ranges 1 rok temu
sessioninfo.c 2bc1d775f5 copyright: update all copyright lines and remove year ranges 1 rok temu
sftpget.c 2bc1d775f5 copyright: update all copyright lines and remove year ranges 1 rok temu
sftpuploadresume.c 2bc1d775f5 copyright: update all copyright lines and remove year ranges 1 rok temu
shared-connection-cache.c 2bc1d775f5 copyright: update all copyright lines and remove year ranges 1 rok temu
simple.c 2bc1d775f5 copyright: update all copyright lines and remove year ranges 1 rok temu
simplepost.c 2bc1d775f5 copyright: update all copyright lines and remove year ranges 1 rok temu
simplessl.c 2bc1d775f5 copyright: update all copyright lines and remove year ranges 1 rok temu
smooth-gtk-thread.c 2bc1d775f5 copyright: update all copyright lines and remove year ranges 1 rok temu
smtp-authzid.c 22c92a6d51 docs: use a space after RFC when spelling out RFC numbers 1 rok temu
smtp-expn.c 2bc1d775f5 copyright: update all copyright lines and remove year ranges 1 rok temu
smtp-mail.c 22c92a6d51 docs: use a space after RFC when spelling out RFC numbers 1 rok temu
smtp-mime.c b39181cedc examples/smtp-mime: use CURLOPT_MAIL_RCPT_ALLOWFAILS 1 rok temu
smtp-multi.c 22c92a6d51 docs: use a space after RFC when spelling out RFC numbers 1 rok temu
smtp-ssl.c 22c92a6d51 docs: use a space after RFC when spelling out RFC numbers 1 rok temu
smtp-tls.c 22c92a6d51 docs: use a space after RFC when spelling out RFC numbers 1 rok temu
smtp-vrfy.c 2bc1d775f5 copyright: update all copyright lines and remove year ranges 1 rok temu
sslbackend.c 2bc1d775f5 copyright: update all copyright lines and remove year ranges 1 rok temu
synctime.c 2bc1d775f5 copyright: update all copyright lines and remove year ranges 1 rok temu
threaded-ssl.c 2bc1d775f5 copyright: update all copyright lines and remove year ranges 1 rok temu
unixsocket.c 4894ca6813 examples/unixsocket.c: example using CURLOPT_UNIX_SOCKET_PATH 1 rok temu
url2file.c 2bc1d775f5 copyright: update all copyright lines and remove year ranges 1 rok temu
urlapi.c 741b6853b9 examples: make use of CURLOPT_(REDIR_|)PROTOCOLS_STR 1 rok temu
usercertinmem.c 2bc1d775f5 copyright: update all copyright lines and remove year ranges 1 rok temu
version-check.pl 2bc1d775f5 copyright: update all copyright lines and remove year ranges 1 rok temu
websocket-cb.c 78886afb50 ws: make the curl_ws_meta() return pointer a const 1 rok temu
websocket.c 78886afb50 ws: make the curl_ws_meta() return pointer a const 1 rok temu
xmlstream.c 2bc1d775f5 copyright: update all copyright lines and remove year ranges 1 rok 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.