﻿<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/"><channel><title>C++博客-Eping -----C++技术博客 -随笔分类-Libcurl</title><link>http://www.cppblog.com/eping/category/14869.html</link><description>专注C++</description><language>zh-cn</language><lastBuildDate>Tue, 05 Oct 2010 22:43:11 GMT</lastBuildDate><pubDate>Tue, 05 Oct 2010 22:43:11 GMT</pubDate><ttl>60</ttl><item><title>ubuntu编译libcurl</title><link>http://www.cppblog.com/eping/archive/2010/09/13/126498.html</link><dc:creator>Eping</dc:creator><author>Eping</author><pubDate>Mon, 13 Sep 2010 03:30:00 GMT</pubDate><guid>http://www.cppblog.com/eping/archive/2010/09/13/126498.html</guid><wfw:comment>http://www.cppblog.com/eping/comments/126498.html</wfw:comment><comments>http://www.cppblog.com/eping/archive/2010/09/13/126498.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cppblog.com/eping/comments/commentRss/126498.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/eping/services/trackbacks/126498.html</trackback:ping><description><![CDATA[

一、下载libcurl&nbsp;http://curl.haxx.se/download/curl-7.21.1.tar.gz<div>二、安装 &nbsp; 指定了安装目录 &nbsp; &nbsp; /usr/local/curl</div><div>命令1: ./configure --prefix=/usr/local/curl</div><div>结果：</div><div><div><br></div><div>&nbsp;&nbsp;curl version: &nbsp; &nbsp;7.21.1</div><div>&nbsp;&nbsp;Host setup: &nbsp; &nbsp; &nbsp;i686-pc-linux-gnu</div><div>&nbsp;&nbsp;Install prefix: &nbsp;/usr/local/curl</div><div>&nbsp;&nbsp;Compiler: &nbsp; &nbsp; &nbsp; &nbsp;gcc</div><div>&nbsp;&nbsp;SSL support: &nbsp; &nbsp; enabled (OpenSSL)</div><div>&nbsp;&nbsp;SSH support: &nbsp; &nbsp; no &nbsp; &nbsp; &nbsp;(--with-libssh2)</div><div>&nbsp;&nbsp;zlib support: &nbsp; &nbsp;enabled</div><div>&nbsp;&nbsp;krb4 support: &nbsp; &nbsp;no &nbsp; &nbsp; &nbsp;(--with-krb4*)</div><div>&nbsp;&nbsp;GSSAPI support: &nbsp;no &nbsp; &nbsp; &nbsp;(--with-gssapi)</div><div>&nbsp;&nbsp;SPNEGO support: &nbsp;no &nbsp; &nbsp; &nbsp;(--with-spnego)</div><div>&nbsp;&nbsp;resolver: &nbsp; &nbsp; &nbsp; &nbsp;default (--enable-ares / --enable-threaded-resolver)</div><div>&nbsp;&nbsp;ipv6 support: &nbsp; &nbsp;enabled</div><div>&nbsp;&nbsp;IDN support: &nbsp; &nbsp; enabled</div><div>&nbsp;&nbsp;Build libcurl: &nbsp; Shared=yes, Static=yes</div><div>&nbsp;&nbsp;Built-in manual: enabled</div><div>&nbsp;&nbsp;Verbose errors: &nbsp;enabled (--disable-verbose)</div><div>&nbsp;&nbsp;SSPI support: &nbsp; &nbsp;no &nbsp; &nbsp; &nbsp;(--enable-sspi)</div><div>&nbsp;&nbsp;ca cert bundle: &nbsp;/etc/ssl/certs/ca-certificates.crt</div><div>&nbsp;&nbsp;ca cert path: &nbsp; &nbsp;no</div><div>&nbsp;&nbsp;LDAP support: &nbsp; &nbsp;enabled (OpenLDAP)</div><div>&nbsp;&nbsp;LDAPS support: &nbsp; enabled</div><div>&nbsp;&nbsp;RTSP support: &nbsp; &nbsp;enabled</div><div>&nbsp;&nbsp;RTMP support: &nbsp; &nbsp;no &nbsp; &nbsp; &nbsp;(--with-librtmp)</div><div>&nbsp;&nbsp;Protocols: &nbsp; &nbsp; &nbsp; DICT FILE FTP FTPS HTTP HTTPS IMAP IMAPS LDAP LDAPS POP3 POP3S RTSP SMTP SMTPS TELNET TFTP</div></div><div>命令2：make</div><div>命令3：sudo make install</div><div>可以看到lib库，已经安装在&nbsp;/usr/local/curl/lib</div><div><div>----------------------------------------------------------------------</div><div>Libraries have been installed in:</div><div>&nbsp;&nbsp; /usr/local/curl/lib</div><div><br></div><div>If you ever happen to want to link against installed libraries</div><div>in a given directory, LIBDIR, you must either use libtool, and</div><div>specify the full pathname of the library, or use the `-LLIBDIR'</div><div>flag during linking and do at least one of the following:</div><div>&nbsp;&nbsp; - add LIBDIR to the `LD_LIBRARY_PATH' environment variable</div><div>&nbsp;&nbsp; &nbsp; during execution</div><div>&nbsp;&nbsp; - add LIBDIR to the `LD_RUN_PATH' environment variable</div><div>&nbsp;&nbsp; &nbsp; during linking</div><div>&nbsp;&nbsp; - use the `-Wl,-rpath -Wl,LIBDIR' linker flag</div><div>&nbsp;&nbsp; - have your system administrator add LIBDIR to `/etc/ld.so.conf'</div><div><br></div><div>See any operating system documentation about shared libraries for</div><div>more information, such as the ld(1) and ld.so(8) manual pages.</div></div><div>在安装目录下/usr/local/curl下会有四个目录&nbsp;bin &nbsp;include &nbsp;lib &nbsp;share 包含了所需的库、头文件等</div><img src ="http://www.cppblog.com/eping/aggbug/126498.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/eping/" target="_blank">Eping</a> 2010-09-13 11:30 <a href="http://www.cppblog.com/eping/archive/2010/09/13/126498.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>libcurl简介</title><link>http://www.cppblog.com/eping/archive/2010/09/13/126497.html</link><dc:creator>Eping</dc:creator><author>Eping</author><pubDate>Mon, 13 Sep 2010 03:08:00 GMT</pubDate><guid>http://www.cppblog.com/eping/archive/2010/09/13/126497.html</guid><wfw:comment>http://www.cppblog.com/eping/comments/126497.html</wfw:comment><comments>http://www.cppblog.com/eping/archive/2010/09/13/126497.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cppblog.com/eping/comments/commentRss/126497.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/eping/services/trackbacks/126497.html</trackback:ping><description><![CDATA[
<h1 class="pagetitle" style="border-top-style: solid; border-right-style: solid; border-bottom-style: solid; border-left-style: solid; border-top-width: thin; border-right-width: thin; border-bottom-width: thin; border-left-width: thin; border-top-color: black; border-right-color: black; border-bottom-color: black; border-left-color: black; background-color: rgb(224, 224, 255); font-family: arial, helvetica, ariel, sans-serif; color: rgb(0, 0, 255); font-size: 22px; font-weight: bold; padding-top: 0px; padding-right: 4px; padding-bottom: 0px; padding-left: 4px; ">libcurl&nbsp;——多协议传输库</h1><div><div><p class="MsoNormal"><span style="font-family:宋体;mso-ascii-font-family:&quot;Times New Roman&quot;;
mso-hansi-font-family:&quot;Times New Roman&quot;">什么是</span><span lang="EN-US">libcurl</span><span style="font-family:宋体;mso-ascii-font-family:&quot;Times New Roman&quot;;mso-hansi-font-family:
&quot;Times New Roman&quot;">——</span><span lang="EN-US">libcurl</span><span style="font-family:宋体;mso-ascii-font-family:&quot;Times New Roman&quot;;mso-hansi-font-family:
&quot;Times New Roman&quot;">是免费的、开源的、容易使用的客户端</span><span lang="EN-US">URL</span><span style="font-family:宋体;mso-ascii-font-family:&quot;Times New Roman&quot;;mso-hansi-font-family:
&quot;Times New Roman&quot;">传输库，支持</span><span lang="EN-US">DICT</span><span style="font-family:宋体;mso-ascii-font-family:&quot;Times New Roman&quot;;mso-hansi-font-family:
&quot;Times New Roman&quot;">、</span><span lang="EN-US">FILE</span><span style="font-family:
宋体;mso-ascii-font-family:&quot;Times New Roman&quot;;mso-hansi-font-family:&quot;Times New Roman&quot;">、</span><span lang="EN-US">FTP</span><span style="font-family:宋体;mso-ascii-font-family:&quot;Times New Roman&quot;;
mso-hansi-font-family:&quot;Times New Roman&quot;">、</span><span lang="EN-US">FTP</span><span style="font-family:宋体;mso-ascii-font-family:&quot;Times New Roman&quot;;mso-hansi-font-family:
&quot;Times New Roman&quot;">、</span><span lang="EN-US">GOPHER</span><span style="font-family:宋体;mso-ascii-font-family:&quot;Times New Roman&quot;;mso-hansi-font-family:
&quot;Times New Roman&quot;">、</span><span lang="EN-US">HTTP</span><span style="font-family:
宋体;mso-ascii-font-family:&quot;Times New Roman&quot;;mso-hansi-font-family:&quot;Times New Roman&quot;">、</span><span lang="EN-US">HTTPS</span><span style="font-family:宋体;mso-ascii-font-family:&quot;Times New Roman&quot;;
mso-hansi-font-family:&quot;Times New Roman&quot;">、</span><span lang="EN-US">IMAP</span><span style="font-family:宋体;mso-ascii-font-family:&quot;Times New Roman&quot;;mso-hansi-font-family:
&quot;Times New Roman&quot;">、</span><span lang="EN-US">IMAPS</span><span style="font-family:
宋体;mso-ascii-font-family:&quot;Times New Roman&quot;;mso-hansi-font-family:&quot;Times New Roman&quot;">、</span><span lang="EN-US">LDAP</span><span style="font-family:宋体;mso-ascii-font-family:&quot;Times New Roman&quot;;
mso-hansi-font-family:&quot;Times New Roman&quot;">、</span><span lang="EN-US">LDAPS</span><span style="font-family:宋体;mso-ascii-font-family:&quot;Times New Roman&quot;;mso-hansi-font-family:
&quot;Times New Roman&quot;">、</span><span lang="EN-US">POP3</span><span style="font-family:
宋体;mso-ascii-font-family:&quot;Times New Roman&quot;;mso-hansi-font-family:&quot;Times New Roman&quot;">、</span><span lang="EN-US">POP3S</span><span style="font-family:宋体;mso-ascii-font-family:&quot;Times New Roman&quot;;
mso-hansi-font-family:&quot;Times New Roman&quot;">、</span><span lang="EN-US">RTMP</span><span style="font-family:宋体;mso-ascii-font-family:&quot;Times New Roman&quot;;mso-hansi-font-family:
&quot;Times New Roman&quot;">、</span><span lang="EN-US">TRSP</span><span style="font-family:
宋体;mso-ascii-font-family:&quot;Times New Roman&quot;;mso-hansi-font-family:&quot;Times New Roman&quot;">、</span><span lang="EN-US">SCP</span><span style="font-family:宋体;mso-ascii-font-family:&quot;Times New Roman&quot;;
mso-hansi-font-family:&quot;Times New Roman&quot;">、</span><span lang="EN-US">SFTP</span><span style="font-family:宋体;mso-ascii-font-family:&quot;Times New Roman&quot;;mso-hansi-font-family:
&quot;Times New Roman&quot;">、</span><span lang="EN-US">SMTP</span><span style="font-family:
宋体;mso-ascii-font-family:&quot;Times New Roman&quot;;mso-hansi-font-family:&quot;Times New Roman&quot;">、</span><span lang="EN-US">SMTPS</span><span style="font-family:宋体;mso-ascii-font-family:&quot;Times New Roman&quot;;
mso-hansi-font-family:&quot;Times New Roman&quot;">、</span><span lang="EN-US">TELNET</span><span style="font-family:宋体;mso-ascii-font-family:&quot;Times New Roman&quot;;mso-hansi-font-family:
&quot;Times New Roman&quot;">和</span><span lang="EN-US">FTFP</span><span style="font-family:
宋体;mso-ascii-font-family:&quot;Times New Roman&quot;;mso-hansi-font-family:&quot;Times New Roman&quot;">等协议。此外</span><span lang="EN-US">Libcurl</span><span style="font-family:宋体;mso-ascii-font-family:
&quot;Times New Roman&quot;;mso-hansi-font-family:&quot;Times New Roman&quot;">还支持安全套接字</span><span lang="EN-US">[SSL]</span><span style="font-family:宋体;mso-ascii-font-family:&quot;Times New Roman&quot;;
mso-hansi-font-family:&quot;Times New Roman&quot;">、</span><span lang="EN-US">HTTP POST</span><span style="font-family:宋体;mso-ascii-font-family:&quot;Times New Roman&quot;;mso-hansi-font-family:
&quot;Times New Roman&quot;">、</span><span lang="EN-US">HTTP PUT</span><span style="font-family:宋体;mso-ascii-font-family:&quot;Times New Roman&quot;;mso-hansi-font-family:
&quot;Times New Roman&quot;">、</span><span lang="EN-US">FTP</span><span style="font-family:
宋体;mso-ascii-font-family:&quot;Times New Roman&quot;;mso-hansi-font-family:&quot;Times New Roman&quot;">上传及基于</span><span lang="EN-US">HTTP</span><span style="font-family:宋体;mso-ascii-font-family:&quot;Times New Roman&quot;;
mso-hansi-font-family:&quot;Times New Roman&quot;">表单的上传，不仅如此它还支持代理、</span><span lang="EN-US">cookies</span><span style="font-family:宋体;mso-ascii-font-family:
&quot;Times New Roman&quot;;mso-hansi-font-family:&quot;Times New Roman&quot;">、用户</span><span lang="EN-US">+</span><span style="font-family:宋体;mso-ascii-font-family:&quot;Times New Roman&quot;;
mso-hansi-font-family:&quot;Times New Roman&quot;">密码的授权认证、文件传输恢复、</span><span lang="EN-US">HTTP</span><span style="font-family:宋体;mso-ascii-font-family:&quot;Times New Roman&quot;;
mso-hansi-font-family:&quot;Times New Roman&quot;">隧道代理等等。</span><span lang="EN-US"><o:p></o:p></span></p>

<p class="MsoNormal"><span lang="EN-US"><span style="mso-tab-count:1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>Libcurl</span><span style="font-family:宋体;mso-ascii-font-family:&quot;Times New Roman&quot;;mso-hansi-font-family:
&quot;Times New Roman&quot;">不仅是个轻量级的网络库，而且是跨平台的网络库。</span><span lang="EN-US">Libcurl</span><span style="font-family:宋体;mso-ascii-font-family:&quot;Times New Roman&quot;;mso-hansi-font-family:
&quot;Times New Roman&quot;">可以在多个平台上编译使用。包括</span><span lang="EN-US">Solaris</span><span style="font-family:宋体;mso-ascii-font-family:&quot;Times New Roman&quot;;mso-hansi-font-family:
&quot;Times New Roman&quot;">、</span><span lang="EN-US">NetBSD</span><span style="font-family:宋体;mso-ascii-font-family:&quot;Times New Roman&quot;;mso-hansi-font-family:
&quot;Times New Roman&quot;">、</span><span lang="EN-US">FreeBSD</span><span style="font-family:宋体;mso-ascii-font-family:&quot;Times New Roman&quot;;mso-hansi-font-family:
&quot;Times New Roman&quot;">、</span><span lang="EN-US">OpenBSD</span><span style="font-family:宋体;mso-ascii-font-family:&quot;Times New Roman&quot;;mso-hansi-font-family:
&quot;Times New Roman&quot;">、</span><span lang="EN-US">Darwin</span><span style="font-family:宋体;mso-ascii-font-family:&quot;Times New Roman&quot;;mso-hansi-font-family:
&quot;Times New Roman&quot;">、</span><span lang="EN-US">HPUX</span><span style="font-family:
宋体;mso-ascii-font-family:&quot;Times New Roman&quot;;mso-hansi-font-family:&quot;Times New Roman&quot;">、</span><span lang="EN-US">IRIX</span><span style="font-family:宋体;mso-ascii-font-family:&quot;Times New Roman&quot;;
mso-hansi-font-family:&quot;Times New Roman&quot;">、</span><span lang="EN-US">RIX</span><span style="font-family:宋体;mso-ascii-font-family:&quot;Times New Roman&quot;;mso-hansi-font-family:
&quot;Times New Roman&quot;">、</span><span lang="EN-US">Tru64</span><span style="font-family:
宋体;mso-ascii-font-family:&quot;Times New Roman&quot;;mso-hansi-font-family:&quot;Times New Roman&quot;">、</span><span lang="EN-US">Linux</span><span style="font-family:宋体;mso-ascii-font-family:&quot;Times New Roman&quot;;
mso-hansi-font-family:&quot;Times New Roman&quot;">、</span><span lang="EN-US">UnixWare</span><span style="font-family:宋体;mso-ascii-font-family:&quot;Times New Roman&quot;;mso-hansi-font-family:
&quot;Times New Roman&quot;">、</span><span lang="EN-US">HURD</span><span style="font-family:
宋体;mso-ascii-font-family:&quot;Times New Roman&quot;;mso-hansi-font-family:&quot;Times New Roman&quot;">、</span><span lang="EN-US">Windows</span><span style="font-family:宋体;mso-ascii-font-family:
&quot;Times New Roman&quot;;mso-hansi-font-family:&quot;Times New Roman&quot;">、</span><span lang="EN-US">Amiga</span><span style="font-family:宋体;mso-ascii-font-family:&quot;Times New Roman&quot;;
mso-hansi-font-family:&quot;Times New Roman&quot;">、</span><span lang="EN-US">OS/2</span><span style="font-family:宋体;mso-ascii-font-family:&quot;Times New Roman&quot;;mso-hansi-font-family:
&quot;Times New Roman&quot;">、</span><span lang="EN-US">BeOs</span><span style="font-family:
宋体;mso-ascii-font-family:&quot;Times New Roman&quot;;mso-hansi-font-family:&quot;Times New Roman&quot;">、</span><span lang="EN-US">MAX OS X</span><span style="font-family:宋体;mso-ascii-font-family:
&quot;Times New Roman&quot;;mso-hansi-font-family:&quot;Times New Roman&quot;">、</span><span lang="EN-US">Ultrix</span><span style="font-family:宋体;mso-ascii-font-family:&quot;Times New Roman&quot;;
mso-hansi-font-family:&quot;Times New Roman&quot;">、</span><span lang="EN-US">QNX</span><span style="font-family:宋体;mso-ascii-font-family:&quot;Times New Roman&quot;;mso-hansi-font-family:
&quot;Times New Roman&quot;">、</span><span lang="EN-US">OpenVMS</span><span style="font-family:宋体;mso-ascii-font-family:&quot;Times New Roman&quot;;mso-hansi-font-family:
&quot;Times New Roman&quot;">、</span><span lang="EN-US">RISC OS</span><span style="font-family:宋体;mso-ascii-font-family:&quot;Times New Roman&quot;;mso-hansi-font-family:
&quot;Times New Roman&quot;">、</span><span lang="EN-US">Novell NetWare</span><span style="font-family:宋体;mso-ascii-font-family:&quot;Times New Roman&quot;;mso-hansi-font-family:
&quot;Times New Roman&quot;">、</span><span lang="EN-US">DOS</span><span style="font-family:
宋体;mso-ascii-font-family:&quot;Times New Roman&quot;;mso-hansi-font-family:&quot;Times New Roman&quot;">等操作系统。</span><span lang="EN-US"><o:p></o:p></span></p>

<p class="MsoNormal"><span lang="EN-US"><span style="mso-tab-count:1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span><span style="font-family:宋体;mso-ascii-font-family:&quot;Times New Roman&quot;;mso-hansi-font-family:
&quot;Times New Roman&quot;">除此之外，</span><span lang="EN-US">libcurl</span><span style="font-family:宋体;mso-ascii-font-family:&quot;Times New Roman&quot;;mso-hansi-font-family:
&quot;Times New Roman&quot;">还具有线程安全，兼容</span><span lang="EN-US">IPv6</span><span style="font-family:宋体;mso-ascii-font-family:&quot;Times New Roman&quot;;mso-hansi-font-family:
&quot;Times New Roman&quot;">、功能丰富、容易使用等特点。目前</span><span lang="EN-US">libcurl</span><span style="font-family:宋体;mso-ascii-font-family:&quot;Times New Roman&quot;;mso-hansi-font-family:
&quot;Times New Roman&quot;">已在许多知名的公司和应用程序中广泛使用。</span><span lang="EN-US"><o:p></o:p></span></p></div><div style="font-size: 24pt; "><span style="font-size: 16px; font-family: arial, sans-serif; ">原文详情：</span><span style="font-size: medium; "><a href="http://curl.haxx.se/libcurl/">http://curl.haxx.se/libcurl/</a></span></div><br></div>
<img src ="http://www.cppblog.com/eping/aggbug/126497.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/eping/" target="_blank">Eping</a> 2010-09-13 11:08 <a href="http://www.cppblog.com/eping/archive/2010/09/13/126497.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>Visual Studio 2008中使用LibCurl</title><link>http://www.cppblog.com/eping/archive/2010/09/06/126027.html</link><dc:creator>Eping</dc:creator><author>Eping</author><pubDate>Mon, 06 Sep 2010 09:32:00 GMT</pubDate><guid>http://www.cppblog.com/eping/archive/2010/09/06/126027.html</guid><wfw:comment>http://www.cppblog.com/eping/comments/126027.html</wfw:comment><comments>http://www.cppblog.com/eping/archive/2010/09/06/126027.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cppblog.com/eping/comments/commentRss/126027.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/eping/services/trackbacks/126027.html</trackback:ping><description><![CDATA[首先下载LibCurl 目前最新版为 7.21.1 &nbsp;下载链接：http://curl.haxx.se/download.html<div>解压后打开vc6curl.dsw 用高版本VS 打开会自动转为相应的工程文件vc6curl.sln 成功编译后可在lib\DLL-Debug目录下找到 静态库libcurld_imp.lib 和动态库libcurld.dll，待会可以拷贝到我们的应用程序目录下，同时可以将curl-7.21.1\include\curl目录拷贝到我们的工程目录下，也可以在VS工程里面指定引用目录。完成这些工作后在VS项目属性页中设置要包含的静态库。步骤：项目——&gt;项目属性——&gt;配置属性——&gt;链接器——&gt;命令行 &nbsp; 在附加选项中 输入lib/libcurld_imp.lib 依具体情况而</div><div><table id="Table1" class="tb" cellspacing="0" cellpadding="3" border="0" style="font-size: 13px; "><tbody><tr><td><pre><div><span style="color: rgb(0, 0, 0); ">#include </span><span style="color: rgb(0, 0, 0); ">"</span><span style="color: rgb(0, 0, 0); ">stdafx.h</span><span style="color: rgb(0, 0, 0); ">"</span><span style="color: rgb(0, 0, 0); ">
#include </span><span style="color: rgb(0, 0, 0); ">"</span><span style="color: rgb(0, 0, 0); ">include/curl/curl.h</span><span style="color: rgb(0, 0, 0); ">"</span><span style="color: rgb(0, 0, 0); ">
#include </span><span style="color: rgb(0, 0, 0); ">&lt;</span><span style="color: rgb(0, 0, 0); ">stdio.h</span><span style="color: rgb(0, 0, 0); ">&gt;</span><span style="color: rgb(0, 0, 0); ">
</span><span style="color: rgb(0, 0, 255); ">int</span><span style="color: rgb(0, 0, 0); "> _tmain(</span><span style="color: rgb(0, 0, 255); ">int</span><span style="color: rgb(0, 0, 0); "> argc, _TCHAR</span><span style="color: rgb(0, 0, 0); ">*</span><span style="color: rgb(0, 0, 0); "> argv[])
{
    CURL </span><span style="color: rgb(0, 0, 0); ">*</span><span style="color: rgb(0, 0, 0); ">curl;
    CURLcode res;
    curl </span><span style="color: rgb(0, 0, 0); ">=</span><span style="color: rgb(0, 0, 0); "> curl_easy_init();
    </span><span style="color: rgb(0, 0, 255); ">if</span><span style="color: rgb(0, 0, 0); "> (curl)
    {
        curl_easy_setopt(curl,CURLOPT_URL,</span><span style="color: rgb(0, 0, 0); ">"</span><span style="color: rgb(0, 0, 0); ">http://www.eping.net</span><span style="color: rgb(0, 0, 0); ">"</span><span style="color: rgb(0, 0, 0); ">);
        res </span><span style="color: rgb(0, 0, 0); ">=</span><span style="color: rgb(0, 0, 0); "> curl_easy_perform(curl);
        curl_easy_cleanup(curl);
    }
    </span><span style="color: rgb(0, 0, 255); ">return</span><span style="color: rgb(0, 0, 0); "> </span><span style="color: rgb(0, 0, 0); ">0</span><span style="color: rgb(0, 0, 0); ">;
}</span></div></pre></td></tr></tbody></table><br></div><img src ="http://www.cppblog.com/eping/aggbug/126027.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/eping/" target="_blank">Eping</a> 2010-09-06 17:32 <a href="http://www.cppblog.com/eping/archive/2010/09/06/126027.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item></channel></rss>