README 4.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. _ _ ____ _
  2. ___| | | | _ \| |
  3. / __| | | | |_) | |
  4. | (__| |_| | _ <| |___
  5. \___|\___/|_| \_\_____|
  6. This directory is for libcurl programming examples. They are meant to show
  7. some simple steps on how you can build your own application to take full
  8. advantage of libcurl.
  9. If you end up with other small but still useful example sources, please mail
  10. them for submission in future packages and on the web site.
  11. BUILDING
  12. The Makefile.example is an example makefile that could be used to build these
  13. examples. Just edit the file according to your system and requirements first.
  14. Most examples should build fine using a command line like this:
  15. $ `curl-config --cc --cflags --libs` -o example example.c
  16. Some compilers don't like having the arguments in this order but instead
  17. want you do reorganize them like:
  18. $ `curl-config --cc` -o example example.c `curl-config --cflags --libs`
  19. *PLEASE* do not use the curl.haxx.se site as a test target for your libcurl
  20. applications/experiments. Even if some of the examples use that site as a URL
  21. at some places, it doesn't mean that the URLs work or that we expect you to
  22. actually torture our web site with your tests! Thanks.
  23. EXAMPLES
  24. anyauthput.c - HTTP PUT using "any" authentication method
  25. cacertinmem.c - Use a built-in PEM certificate to retrieve a https page
  26. cookie_interface.c - shows usage of simple cookie interface
  27. curlgtk.c - download using a GTK progress bar
  28. curlx.c - getting file info from the remote cert data
  29. debug.c - showing how to use the debug callback
  30. fileupload.c - uploading to a file:// URL
  31. fopen.c - fopen() layer that supports opening URLs and files
  32. ftpget.c - simple getting a file from FTP
  33. ftpgetresp.c - get the response strings from the FTP server
  34. ftpupload.c - upload a file to an FTP server
  35. ftpuploadresume.c - resume an upload to an FTP server
  36. getinfo.c - get the Content-Type from the recent transfer
  37. getinmemory.c - download a file to memory only
  38. ghiper.c - curl_multi_socket() using code with glib-2
  39. hiperfifo.c - downloads all URLs written to the fifo, using
  40. curl_multi_socket() and libevent
  41. htmltidy.c - download a document and use libtidy to parse the HTML
  42. htmltitle.cc - download a HTML file and extract the <title> tag from a HTML
  43. page using libxml
  44. http-post.c - HTTP POST
  45. httpput.c - HTTP PUT a local file
  46. https.c - simple HTTPS transfer
  47. imap.c - simple IMAP transfer
  48. multi-app.c - a multi-interface app
  49. multi-debugcallback.c - a multi-interface app using the debug callback
  50. multi-double.c - a multi-interface app doing two simultaneous transfers
  51. multi-post.c - a multi-interface app doing a multipart formpost
  52. multi-single.c - a multi-interface app getting a single file
  53. multi-uv.c - a multi-interface app using libuv
  54. multithread.c - an example using multi-treading transferring multiple files
  55. opensslthreadlock.c - show how to do locking when using OpenSSL multi-threaded
  56. persistant.c - request two URLs with a persistent connection
  57. pop3s.c - POP3S transfer
  58. pop3slist.c - POP3S LIST
  59. post-callback.c - send a HTTP POST using a callback
  60. postit2.c - send a HTTP multipart formpost
  61. sampleconv.c - showing how a program on a non-ASCII platform would invoke
  62. callbacks to do its own codeset conversions instead of using
  63. the built-in iconv functions in libcurl
  64. sepheaders.c - download headers to a separate file
  65. simple.c - the most simple download a URL source
  66. simplepost.c - HTTP POST
  67. simplessl.c - HTTPS example with certificates many options set
  68. synctime.c - Sync local time by extracting date from remote HTTP servers
  69. url2file.c - download a document and store it in a file
  70. xmlstream.c - Stream-parse a document using the streaming Expat parser
  71. 10-at-a-time.c - Download many files simultaneously, 10 at a time.