| 1 |
_ _ ____ _ |
| 2 |
___| | | | _ \| | |
| 3 |
/ __| | | | |_) | | |
| 4 |
| (__| |_| | _ <| |___ |
| 5 |
\___|\___/|_| \_\_____| |
| 6 |
|
| 7 |
This directory is for libcurl programming examples. They are meant to show |
| 8 |
some simple steps on how you can build your own application to take full |
| 9 |
advantage of libcurl. |
| 10 |
|
| 11 |
If you end up with other small but still useful example sources, please mail |
| 12 |
them for submission in future packages and on the web site. |
| 13 |
|
| 14 |
BUILDING |
| 15 |
|
| 16 |
The Makefile.example is an example makefile that could be used to build these |
| 17 |
examples. Just edit the file according to your system and requirements first. |
| 18 |
|
| 19 |
Most examples should build fine using a command line like this: |
| 20 |
|
| 21 |
$ `curl-config --cc --cflags --libs` -o example example.c |
| 22 |
|
| 23 |
Some compilers don't like having the arguments in this order but instead |
| 24 |
want you do reorganize them like: |
| 25 |
|
| 26 |
$ `curl-config --cc` -o example example.c `curl-config --cflags --libs` |
| 27 |
|
| 28 |
*PLEASE* do not use the curl.haxx.se site as a test target for your libcurl |
| 29 |
applications/experiments. Even if the examples in this directory use that site |
| 30 |
as an example URL at some places, it doesn't mean that the URLs work or that |
| 31 |
we expect you to actually torture our web site with your tests! Thanks. |
| 32 |
|
| 33 |
EXAMPLES |
| 34 |
|
| 35 |
anyauthput.c - HTTP PUT using "any" authentication method |
| 36 |
curlgtk.c - download using a GTK progress bar |
| 37 |
curlx.c - getting file info from the remote cert data |
| 38 |
debug.c - showing how to use the debug callback |
| 39 |
fileupload.c - uploading to a file:// URL |
| 40 |
fopen.c - fopen() layer that supports opening URLs and files |
| 41 |
ftp3rdparty.c - FTP 3rd party transfer |
| 42 |
ftpget.c - simple getting a file from FTP |
| 43 |
ftpgetresp.c - get the response strings from the FTP server |
| 44 |
ftpupload.c - upload a file to a FTP server |
| 45 |
getinfo.c - get the Content-Type from the recent transfer |
| 46 |
getinmemory.c - download a file to memory only |
| 47 |
htmltitle.cc - download a HTML file and extract the <title> tag from a HTML |
| 48 |
page using libxml |
| 49 |
http-post.c - HTTP POST |
| 50 |
httpput.c - HTTP PUT a local file |
| 51 |
https.c - simple HTTPS transfer |
| 52 |
multi-app.c - a multi-interface app |
| 53 |
multi-debugcallback.c - a multi-interface app using the debug callback |
| 54 |
multi-double.c - a multi-interface app doing two simultaneous transfers |
| 55 |
multi-post.c - a multi-interface app doing a multipart formpost |
| 56 |
multi-single.c - a multi-interface app getting a single file |
| 57 |
multithread.c - an example using multi-treading transfering multiple files |
| 58 |
persistant.c - request two URLs with a persistant connection |
| 59 |
post-callback.c - send a HTTP POST using a callback |
| 60 |
postit2.c - send a HTTP multipart formpost |
| 61 |
sepheaders.c - download headers to a separate file |
| 62 |
simple.c - the most simple download a URL source |
| 63 |
simplepost.c - HTTP POST |
| 64 |
simplessl.c - HTTPS example with certificates many options set |