ChinaUnix.net
相关文章推荐:

Linux下LibCurl

2 libcurl编程 2.1 libcurl编程流程 在基于libcurl的程序里,主要采用callback function (回调函数)的形式完成传输任务,用户在启动传输前设置好各类参数和回调函数,当满足条件时libcurl将调用用户的回调函数实现特定功能。面是利用libcurl完成传输任务的流程: 1. 调用curl_global_init()初始化libcurl 2. 调用 curl_easy_init()函数得到 easy interface型指针 3. 调用curl_easy_setopt设置传输选...

by vicegod - Linux文档专区 - 2009-02-10 15:44:16 阅读(1582) 回复(0)

相关讨论

如何在linux安装libcurl,大家用的libcurl都是什么版本 [ 本帖最后由 忆秋 于 2008-4-8 17:52 编辑 ]

by 忆秋 - Linux新手园地 - 2008-04-09 21:38:45 阅读(22269) 回复(14)

我想请教一 在multi curl 里面,我想进行限速,虽然没有看curl的code但是感觉是multi curl 中并没有提供限速的功能。 不知道大家有没有这方面的经验。

by gooderfeng - C/C++ - 2009-11-05 14:24:13 阅读(2746) 回复(7)

一般的method为get,post,现在我们使用了自定义的method,请问怎么来设置?

by 都是虫子惹的祸 - C/C++ - 2009-03-10 16:41:02 阅读(1576) 回复(4)

代码如/*****************************************************************************  * _ _ ____ _  * Project ___| | | | _ \| |  * / __| | | | |_) | |  * | (__| |_| | _ <| |___  * \___|\___/|_| \_\_____|  *  * $Id: post-c...

by Ray001 - C/C++ - 2007-07-24 09:39:09 阅读(2832) 回复(1)

系统是debian 6.0, 想让libcurl支持ssl, ssh, idn. openssh, ssh2均装在/usr/liblibcurl可以编译安装,装在/usr/local/lib,可是在编译应用的时候总是出错,关于ssh2的函数引用未定义。有没有前辈碰到过同样的问题,怎么解决的,谢谢!

by keithnwsuaf - C/C++ - 2011-02-23 09:19:08 阅读(2136) 回复(3)

问个问题啊,发现有几个https居然不能正常访问,比如面这个 curl_easy_setopt(curl, CURLOPT_URL, "https://loginchina.alibaba.com/member/signin.htm"); curl_easy_setopt(curl, CURLOPT_VERBOSE, 1L); curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, 1L); curl_easy_setopt(curl, CURLOPT_SSL_VERIFYPEER, 0L); curl_easy_setopt(curl, CURLOPT_SSL_VERIFYHOST, 0L);打开调试,发现一直会跳转,一直跳转到127.0.0.1,返回Co...

by c/unix - C/C++ - 2013-03-31 14:54:21 阅读(1558) 回复(1)

请教一,我是用libcurl载网页数据,在自己的机器上可以获取到完整数据,可是在服务器上就不可以,是代码编写的问题,还是libcurl在高并发的环境需要做设置? 现在我把可以稳定运行的代码,和我自己修改的代码,贴出来,请大家指教一。 老版本,可稳定运行,回调函数中 wr_index,wr_buf变量时全局的 int get_curl2buf(char *url) { CURL *curl; CURLcode ret; wr_index = 0; curl = curl_easy_init(); if (!curl...

by tianhailong - C/C++ - 2013-07-17 14:49:40 阅读(5021) 回复(2)

新写的一个程序打算用libcurl库实现上传文件功能。面是实现ftp功能的函数。主函数中不调用该函数执行后用top查看(VIRT RES).基本能保持在一个固定值。调用该函数后(VIRT RES).都会逐渐增大。这是啥原因?是函数哪里有问题?需要怎么修正? int ftpupload(char *ip,char *account,char *logfile) { char full_path[PATH_MAX],*logbasename,remote_url[PATH_MAX]; CURL *curl; CURLcode res; FILE *hd_src; //计算日志全完...

by yuipr - C/C++ - 2009-08-28 11:33:11 阅读(1493) 回复(0)

curl是开源的东西,主要用于页面载和上传 1、对于页面跳转的网站,最好先用sniffer把http数据包全部抓,分析协议头,尤其是要对应好post后的url地址,以及记住cookie中的session_id(情况根据各网站会有所差别)。 2、 curl_easy_setopt(curl,CURLOPT_POST,1); 使用POST方式 3、curl_easy_setopt(curl,CURLOPT_POSTFIELDS,buffer) buffer对应content中的内容,类似"name=zhangsan&pwd=1234&Submit2=%B5%C7+%C2%BC&oriurl=%2F&...

by liu277325073 - Linux文档专区 - 2008-07-15 17:11:03 阅读(1456) 回复(0)

Using cURL and libcurl with PHP Intended Audience This tutorial is intended for PHP programmers and web developers interested in using their webserver to transfer files or communicate with other servers. You will need some general knowledge of client-server protocol on the Internet, and a basic knowledge of PHP syntax. Overview cURL and libcurl are libaries that allow a webserver to transfer files...

by liuxingyuyuni - php文档中心 - 2008-04-22 12:08:17 阅读(1178) 回复(0)