Git init
[external/curl.git] / docs / examples / README
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 some of the examples use that site as a URL
30 at some places, it doesn't mean that the URLs work or that we expect you to
31 actually torture our web site with your tests!  Thanks.
32
33 EXAMPLES
34
35 anyauthput.c   - HTTP PUT using "any" authentication method
36 cacertinmem.c  - Use a built-in PEM certificate to retrieve a https page
37 cookie_interface.c - shows usage of simple cookie interface
38 curlgtk.c      - download using a GTK progress bar
39 curlx.c        - getting file info from the remote cert data
40 debug.c        - showing how to use the debug callback
41 fileupload.c   - uploading to a file:// URL
42 fopen.c        - fopen() layer that supports opening URLs and files
43 ftpget.c       - simple getting a file from FTP
44 ftpgetresp.c   - get the response strings from the FTP server
45 ftpupload.c    - upload a file to an FTP server
46 ftpuploadresume.c - resume an upload to an FTP server
47 getinfo.c      - get the Content-Type from the recent transfer
48 getinmemory.c  - download a file to memory only
49 ghiper.c       - curl_multi_socket() using code with glib-2
50 hiperfifo.c    - downloads all URLs written to the fifo, using
51                  curl_multi_socket() and libevent
52 htmltidy.c     - download a document and use libtidy to parse the HTML
53 htmltitle.cc   - download a HTML file and extract the <title> tag from a HTML
54                  page using libxml
55 http-post.c    - HTTP POST
56 httpput.c      - HTTP PUT a local file
57 https.c        - simple HTTPS transfer
58 multi-app.c    - a multi-interface app
59 multi-debugcallback.c - a multi-interface app using the debug callback
60 multi-double.c - a multi-interface app doing two simultaneous transfers
61 multi-post.c   - a multi-interface app doing a multipart formpost
62 multi-single.c - a multi-interface app getting a single file
63 multithread.c  - an example using multi-treading transferring multiple files
64 opensslthreadlock.c - show how to do locking when using OpenSSL multi-threaded
65 persistant.c   - request two URLs with a persistent connection
66 post-callback.c - send a HTTP POST using a callback
67 postit2.c      - send a HTTP multipart formpost
68 sampleconv.c   - showing how a program on a non-ASCII platform would invoke
69                  callbacks to do its own codeset conversions instead of using
70                  the built-in iconv functions in libcurl
71 sepheaders.c   - download headers to a separate file
72 simple.c       - the most simple download a URL source
73 simplepost.c   - HTTP POST
74 simplessl.c    - HTTPS example with certificates many options set
75 synctime.c     - Sync local time by extracting date from remote HTTP servers
76 10-at-a-time.c - Download many files simultaneously, 10 at a time.