libcurl

Pass GET parameters with Ruby Curb

ぃ、小莉子 提交于 2019-12-07 10:22:57
问题 I'm trying to use Curb (curb.rubyforge.org) to call a RESTful API that needs parameters supplied in a get request. I want to fetch a URL like http://foo.com/bar.xml?bla=blablabla . I'd like to be able to do something like Curl::Easy.perform("http://foo.com/bar.xml", :bla => 'blablabla') {|curl| curl.set_some_headers_if_necessary } but so far, the only way I can see to do this is by manually including the ?bla=blablabla in the URL and doing the encoding myself. Surely there is a right way to

Is including libCurl in an iPhone app store app allowed? Anyone done this?

余生长醉 提交于 2019-12-07 09:02:55
问题 I would like to use libCurl in an app for communicating with web services, and unfortunately it is not included int he iPhone SDK. Now I've figured out how to include Curl as a static library in my app, however, I'm wondering if this will get my app rejected with Apple. Has anyone included Curl in an app and had it approved by Apple? Thankyou. EDIT: Guess I should have been more clear, I was wondering if anyone had actually done this, because I am unsure whether the Curl SDK contains

Install pyCurl in ActivePython-2.6?

别等时光非礼了梦想. 提交于 2019-12-07 07:11:24
问题 I have worked with pyCurl in the past and have it working with my system default python install. However, I have a project that requires python to be more portable and I am using ActivePython-2.6. I have had no problems installing any other modules so far, but am getting errors installing pyCurl. The error: Searching for pycurl Reading http://pypi.python.org/simple/pycurl/ Reading http://pycurl.sourceforge.net/ Reading http://pycurl.sourceforge.net/download/ Best match: pycurl 7.19.0

Linking libcurl while cross compiling with mingw32 under Linux for Windows

孤街醉人 提交于 2019-12-07 04:49:46
问题 I have compiled libcurl using mingw32 and am trying to link it with my program using mingw32 for a Windows system from my Linux machine. I was outputted the files, libcurl-4.dll libcurl.a libcurl.la libcurl.lai. I have included them in my mingw32 libs folder at: /usr/x86_64-w64-mingw32/lib I was able to find a few other topics on linking with the libstdc++ and libgcc to take care dependency errors while executed but when trying to add libcurl.a it will not compile period. I used the following

开源免费的C/C++网络库(c/c++ sockets library)

佐手、 提交于 2019-12-07 03:24:18
(1)ACE 庞大、复杂,适合大型项目。开源、免费,不依赖第三方库,支持跨平台。 http://www.cs.wustl.edu/~schmidt/ACE.html (2)Asio Asio基于Boost开发的异步IO库,封装了Socket,简化基于socket程序的开发。 开源、免费,支持跨平台。 http://think-async.com/ (3)POCO POCO C++ Libraries 提供一套 C++ 的类库用以开发基于网络的可移植的应用程序,功能涉及线程、线程同步、文件系统访问、流操作、共享库和类加载、套接字以及网络协议包括:HTTP、 FTP、SMTP 等;其本身还包含一个 HTTP 服务器,提供 XML 的解析和 SQL 数据库的访问接口。POCO库的模块化、高效的设计及实现使得POCO特别适合嵌入式开发。在嵌入式开发领域,由于C++既适合底层(设备I/O、中断处理等)和高层面向对象开发,越来越流行。 http://pocoproject.org/ (4)libevent Libevent是一个轻量级的开源高性能网络库,从它的官网标题:libevent-an event notification library就能知道它的机制是采用事件触发,封装了以下三种事件的响应:IO事件,定时器事件,信号事件。select模型来实现跨平台的操作

Simple HTTP request with C++

試著忘記壹切 提交于 2019-12-07 02:54:25
问题 Before you flag this for redundancy, do know that I have tried a lot of the methods posted around the web (stack overflow included) already and they each couldn't satisfy my needs. Also do note I am quite new to the programming world so excuse me for my misuse of technical terms. Right now I am writing a C++ program that computes some data from the user's computer (IP address for example), then I send the IP address to a server that's already set up. I do this through an URL. So for example,

what does curlopt_binarytranfer exactly mean?

我们两清 提交于 2019-12-06 23:04:23
问题 i dont understand what is the difference between CURLOPT_RETURNTRANSFER AND CURLOPT_BINARYTRANSFER i wrote a script to check it <?php $image_url = "http://localhost/curl/img1.png"; $ch = curl_init(); $timeout = 0; curl_setopt ($ch, CURLOPT_URL, $image_url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_BINARYTRANSFER, 1); $image = curl_exec($ch); curl_close($ch); header("Content-type: image/jpeg"); print $image; ?> in this case i get the image displayed in the browser

How does one parse HTTP headers with libcurl?

有些话、适合烂在心里 提交于 2019-12-06 18:50:14
问题 I've been looking around and am quite surprised that there seems to be no means by which one can parse headers generically in libcurl (which seems to be the canonical C library for http these days). The closest thing I've found was a mailing list post where someone suggested someone else search through the mailing list archives. The only facility that is provided by libcurl via setopt is CURLOPT_HEADERFUNCTION which will feed the header responses a single line at a time. This seems entirely

C++ libcurl check header before downloading body in one request

好久不见. 提交于 2019-12-06 14:15:40
问题 In C++, I want to use libcurl to check that a URL is text/html, and if yes, to then download the body, else it stops. I want this todo in one step , not first sending HEAD, if HEAD is ok, requesting the page again to download. If this is not possible with libcurl, does it give other libaries for C++, which would support this? 回答1: To send a HTTP HEAD request, you need to set this option up: curl_easy_setopt(ctx,CURLOPT_NOBODY ,1 ); and you can also have a look at this question: help needed on

HTTP/FTP客户端开发库:libwww、libcurl、libfetch 以及更多

≯℡__Kan透↙ 提交于 2019-12-06 13:00:39
网页抓取和ftp访问是目前很常见的一个应用需要,无论是搜索引擎的爬虫,分析程序,资源获取程序,WebService等等都是需要的,自己开发抓取库当然是最好了,不过开发需要时间和周期,使用现有的Open source程序是个更好的选择,一来别人已经写的很好了,就近考验,二来自己使用起来非常快速,三来自己还能够学习一下别人程序的优点。 闲来无事,在网上浏览,就发现了这些好东西,特别抄来分享分享。主要就是libwww、libcurl、libfetch 这三个库,当然,还有一些其他很多更优秀库,文章后面会有简单的介绍。 【libwww】 官方网站: http://www.w3.org/Library/ 更多信息: http://www.w3.org/Library/User/ 运行平台:Unix/Linux,Windows 以下资料来源: http://9.douban.com/site/entry/15448100/ , http://zh.wikipedia.org/wiki/Libwww 简介: Libwww 是一个高度模组化用户端的网页存取API ,用C语言写成,可在 Unix 和 Windows 上运行。 It can be used for both large and small applications including: browsers/editors, robots