libcurl

Http posting a comment to wordpress in c

Hi.I can't post comment to wordpress page in c using curl.I tried formadd but it didn't happen again. <input id="author" name="author" type="text" value="" size="30" aria-required="true"> <input id="email" name="email" type="text" value="" size="30" aria-required="true"> <input id="url" name="url" type="text" value="" size="30"> <textar...

How to use curlpp's InfoGetter?

I'm using curlpp in an application and need to get the URL I was redirected to. Apparently there are two ways: track the Location headers (ugly) or use curlpp::InfoGetter (the c++ counterpart of curl_easy_getinfo()). But how do I use curlpp::InfoGetter? I cant't find any examples. Does anyone have a short snippet? ...

Libcurl via threads! Problem

Hello I am coding program on c# (C#, & object oriented programming newbie) I am trying to download pages in multiple threads. There are no problems when running only 1 thread. Problems starts when I run multiple. It seems like all of the threads save the downloaded info in the same variable SockBuff, but I have no ideas what to do to...

Downloading image via libcurl

I try to download image via libcurl (I know other options to download, but I need to get it done via libcurl) When I download & save the image, I can not open it. The file size is different as when downloading file myself. using System; using System.Windows.Forms; using SeasideResearch.LibCurlNet; using System.IO; namespace WindowsFor...

Limit libcurl response data

i'm trying to get some number of bytes from source using libcurl by setting: curl_easy_setopt(curl, CURLOPT_BUFFERSIZE, 100); //get 100 bytes from source But I get different size of data each time, not even close sometimes only 22 bytes. does this work? ...

vc++ installing libcurl

Hey, firstly thanks for reading this. I am a bit of a noobie c++ programmer with a great idea. For programming this I need to download some HTML off websites. I have chosen libCurl due to perform this task. The libcurl website is of little help to me. Most of the information on their website is outdated or deviates slightly. So, some mo...

C++, JsonCpp, libcurl and UTF-8 woes

I had some problems making libcurl work with C++ JsonCpp library and, after a lot of research, I came up with this code: int post(const string& call, const string& key, const string& value) { // (...) char* char_data=NULL; struct curl_slist *headers=NULL; headers = curl_slist_append(headers, "Content-Type: application/json; c...

Compiling libcurl x86 on Linux x64

I've cross-compiled the bulk of my 32-bit code on my x64 Ubuntu install, but I can't work out how to do the same trick with libcurl. I've tried many permutations of --host and/or --build i486, x86, etc. but none have helped. I've also tried editing the makefiles to include gcc's -m32 flag manually, but it never shows up when I run them....

QByteArray to char*, sending with libcurl

I'm having trouble with saving a QPixmap to QByteArray, then writing it to char*. For example i'm trying to write to a file with ofstream. QByteArray bytes; QBuffer buff(&bytes); buff.open(QIODevice::ReadOnly); pixmap.save(&buff, "PNG"); QString str(by...

Problem installing LibCurl + LibXML + FeedZirra on Windows XP.

Hi, I am rails newbie. I am working on Windows XP. I have this version of ruby. ruby 1.8.7 (2010-08-16 patchlevel 302) [i386-mingw32] I have Rails 2.3.8 installed. I am trying to install feedzirra trying every possible way after watching the Rails Cast 168. First I tried to install using gem install pauldix-feedzirra. I got this ...

Problems using cURL with C and non top-level URLs

I'm using cURL to scrape web pages but I can only seem to scrape top-level URLs. For example, if I want to cURL the URL "http://www.businessweek.com/news/2010-09-29/flaherty-says-canada-july-gdp-report-tomorrow-may-be-negative.html" then it returns nothing (as if it's a blank page). This is my C code: #include <stdio.h> #include <curl/...

writing cURL like function in a rails app

Hi guys! I'm trying to convert this PHP cURL function to work with my rails app. The piece of code is from an SMS payment gateway that needs to verify the POST paramters. Since I'm a big PHP noob I have no idea how to handle this problem. $verify_url = 'http://smsgatewayadress'; $fields = ''; $d = array( 'merch...

lib curl symbol not found

Really stupid C question. I'm trying to build the source code here so I can start on modifying it for myself http://curl.haxx.se/libcurl/c/ftpget.html I download the file, then run gcc -o test ftpget.c and get Undefined symbols: "_curl_global_init", referenced from: _main in ccFchguB.o "_curl_easy_perform", referenced fr...

Curl request is failing on the SSL?

I have this code if(ereg("^(https)",$url)) curl_setopt($curl,CURLOPT_SSL_VERIFYPEER,false); // execute, and log the result to curl_put.log $result = curl_exec($curl); $error = curl_error($curl); The error specified is SSL read: error:00000000:lib(0):func(0):reason(0), errno 104 Any ideas on the cause ...

Can't find out callback function

Hi plz help me i can't find out callback function for CURLOPT_WRITEFUNCTION to download images and save it to file or memory. Thank you for help. ...

libxml2 HTMLparser module guideline

I'm trying to parse an HTML file saved in memory. I'm fetching the HTML with libcurl and save it in memory as string. I'm having problems parsing this html with the HTMLparser module. I'm looking for a short guideline on how to parse and walk on this parsed html using libxml2 HTMLparser module with c++ Thanks EDIT: I'm getting this e...

HTML decoding in C/C++

I'm using libcurl for getting HTML pages. I have some problems with Hebrew characters. for example this: &#1505;&#1500;&#1511;&#1493;&#1501; gets gibberish. How do I get Hebrew characters and not gibberish? Do I need some HTML decoder? Does libcurl support such operation? Does libiconv support such operation? I appreciate any help...

C++: Libcurl curl_easy_init() gives an access violation error and crashes the program

Hello, I'm trying to use libcurl with a program I'm making, but I'm having some problems with it. So far I've only tried the examples from libcurl's website, but they crash as soon as the program gets to the curl initialization. My current code: #include <iostream> #include <curl/curl.h> int main(int argc, char *argv[]) { CURL *c...

Communicating over telnet

I can't use Boost ASIO (reasons not related to programming) and I looked around and libcurl looks good. I'm building the binaries at the moment and decided to get some feedback from the community. Any comments regarding libcurl/alternatives? UPDATE: libcurl's not great for telnet. It's 2010! Shouldn't there be a simple way to do this?...

How to Install Latest Libcurl Package in WAMP

I am aware of how to enable the php_curl.dll file by uncommenting the ; from within php.ini When I do that however, the version of curl provided with a default WAMP install is 7.19.2 at the moment (Oct 2010). I am in need of the latest libcurl version which is 7.21.2 to be working together with PHP and Apache on a Windows 7 32 bit OS. ...