libcurl - the multiprotocol file transfer lib...
来源:百度文库 编辑:神马文学网 时间:2024/04/30 02:11:42
libcurl - small example snippets
We're trying to gather example source codes here, that show how to write programs using the libcurl interface. Feel encouraged to submit yours!
PLEASE do not use the curl.haxx.se site as a test target for your libcurl applications/experiments. Even if the examples sometimes use that site as an example URL at some places, it doesn't mean that the URLs work or that we expect you to actually torture our web site with your tests! Thanks.
simple HTTP
simple.c shows how to get a remote web page in only five libcurl function calls.
simple HTTPS
https.c gets a single HTTPS page, whilesimplessl.c shows how to get a remote https page and a set of various SSL-controlling options.
get HTTP with headers separate
sepheader.c gets a web page and stores the response-headers in a separate file.
simple FTP
ftpget.c proves that getting a FTP file is just as simple.
FTP upload
ftpupload.c uploads a local file to a remote FTP server. It also renames the file after succcessful transfer.
get a remote file in memory only
getinmemory.c describes how you can use the callback system to fetch documents into a ram buffer with no file writing necessary.
HTTP PUT
httpput.c makes PUTs a local file to a HTTP server.
HTTP form POST
postit2.c shows how to build a RFC1867-style form post and send it to a HTTP server.
persistant transfers
persistant.c shows that just getting files in a sequential manner will make it use persistant connections if the remote server supports it.
multithreaded URL fetches
multithread.c starts a number of threads and retrieves one URL in each thread. This requires a working thread library.
URL fetch with GTK progress bar
curlgtk.c uses GTK and the libcurl progress callback to show a GUI progress bar while downloading.
fopen() URL
fopen.c shows how you could write an fopen()-style emulation layer to easily make your program read URLs instead of local files.
nonblocking multipart formpost
multi-post.c makes a multipart formpost using the multi interface, which makes it a non-blocking operation.
debug callback
debug.c shows how you can use the debug callback to get a full trace of all protocol data being sent/received (and more).
HTML parsing
htmltitle.cc shows how to use libxml to parse HTML retrieved with libcurl.
Using CURLOPT_SSL_CTX_FUNCTION
curlx.c usesCURLOPT_SSL_CTX_FUNCTION to set a custom callback to deal with an OpenSSL SSL_CTX * at SSL handshake time.
Doing SOAP with libcurl
SOAP example by vivtek.com
You'll also find these examples in the distribution archive, in thedocs/examples directory.
Page updated September 08, 2008.
web site info
We're trying to gather example source codes here, that show how to write programs using the libcurl interface. Feel encouraged to submit yours!
PLEASE do not use the curl.haxx.se site as a test target for your libcurl applications/experiments. Even if the examples sometimes use that site as an example URL at some places, it doesn't mean that the URLs work or that we expect you to actually torture our web site with your tests! Thanks.
simple HTTP
simple.c shows how to get a remote web page in only five libcurl function calls.
simple HTTPS
https.c gets a single HTTPS page, whilesimplessl.c shows how to get a remote https page and a set of various SSL-controlling options.
get HTTP with headers separate
sepheader.c gets a web page and stores the response-headers in a separate file.
simple FTP
ftpget.c proves that getting a FTP file is just as simple.
FTP upload
ftpupload.c uploads a local file to a remote FTP server. It also renames the file after succcessful transfer.
get a remote file in memory only
getinmemory.c describes how you can use the callback system to fetch documents into a ram buffer with no file writing necessary.
HTTP PUT
httpput.c makes PUTs a local file to a HTTP server.
HTTP form POST
postit2.c shows how to build a RFC1867-style form post and send it to a HTTP server.
persistant transfers
persistant.c shows that just getting files in a sequential manner will make it use persistant connections if the remote server supports it.
multithreaded URL fetches
multithread.c starts a number of threads and retrieves one URL in each thread. This requires a working thread library.
URL fetch with GTK progress bar
curlgtk.c uses GTK and the libcurl progress callback to show a GUI progress bar while downloading.
fopen() URL
fopen.c shows how you could write an fopen()-style emulation layer to easily make your program read URLs instead of local files.
nonblocking multipart formpost
multi-post.c makes a multipart formpost using the multi interface, which makes it a non-blocking operation.
debug callback
debug.c shows how you can use the debug callback to get a full trace of all protocol data being sent/received (and more).
HTML parsing
htmltitle.cc shows how to use libxml to parse HTML retrieved with libcurl.
Using CURLOPT_SSL_CTX_FUNCTION
curlx.c usesCURLOPT_SSL_CTX_FUNCTION to set a custom callback to deal with an OpenSSL SSL_CTX * at SSL handshake time.
Doing SOAP with libcurl
SOAP example by vivtek.com
You'll also find these examples in the distribution archive, in thedocs/examples directory.
Page updated September 08, 2008.
web site info
libcurl - the multiprotocol file transfer lib...
The Negative Transfer
libcurl
Creating the Spec File
The Google File System
UDT: Breaking the Data Transfer Bottleneck
The Java Class File Format
The Google File System中文版
The Negative Transfer of Mother Tongue and Chinglish
Initialization file - Wikipedia, the free encyclopedia
Google Research Publication: The Google File ...
The Portable Executable File Format - Abstract
The Labs: 3DS File Format
File
The Most Interesting README File Ever? | fsckin w/ linux
Peering Inside the PE: A Tour of the Win32 Portable Executable File Format
libcurl - C API
The Babylonian Talmud, Tract Sabbath, Rodkinson, tr.; Book I: Volume I: Chapter I: Regulations Regarding Transfer on Sabbath
[Laskey99] Section 5.3. MultiProtocol Interchange
Eclipse中文件系统不同步问题resource is out of sync with the file system的解决办法
Inside Windows: An In-Depth Look into the Win32 Portable Executable File Format
Windows could not start because the following file is missing or corrupt:
Representational State Transfer
技术观察:Lib 2.0