libcurl

Bringing libcurl into a C++ program

I'm trying to pull libcurl into a large C++ project. However I am having trouble getting it to compile. I see errors coming from ws2def.h, winsock2.h, and ws2tcpip.h Some of the errors look like this: error C2061: syntax error : identifier 'iSockaddrLength' ws2def.h 225 error C3646: 'LPSOCKADDR' : unknown override specifier ws2...

POSTing File Attachments over HTTP via JSON API

I have a model called Book, which has_many :photos (file attachments handled by paperclip). I'm currently building a client which will communicate with my Rails app through JSON, using Paul Dix's Typhoeus gem, which uses libcurl. POSTing a new Book object was easy enough. To create a new book record with the title "Hello There" I could...

Uploading to Amazon S3 using cURL/libcurl

Hi I am currently trying to develop an application to upload files to an Amazon S3 bucket using cURL and c++. After carefully reading the S3 developers guide I have started implementing my application using cURL and forming the Header as described by the Developers guide and after lots of trials and errors to determine the best way to c...

how to upload file by POST in libcurl?

how to upload file by POST in libcurl?(c++) ...

Install Ruby Curb gem in windows XP

I'm trying to do file uploads with ruby 1.8 and it seems like there are no good out-of-the-box solutions. They all seem to need some 3rd party patch or fork of a project to work. I would use mechanize but I actually need to interface with an xml api and mechanize seems to be made specifically for dealing directly with webpages. I've trie...

Clearing libcurl memory in C#?

Is there a way to just clear all memory in c sharp ? For example my program is being run one time and it has filled an array. Is there a function which could clean all memory before the 2nd run so that I do not need to clear all variables ? Edit: Including text of OP's answer below I am using libcurl in my program. I click run, libc...

Getting HTTP xml error response using cURL

Hi I am currently using cURL to communicate to a cloud site... everything is going well except for an annoying issue. The issue is that I cannot get the site's xml response when there is an error. for example, when I use Wire Shark to check the transfer I can see that in the HTTP header that I'm getting which contains the error code; th...

Django returning HTTP 301?

Hi, I have a django view that returns HTTP 301 on a curl request: grapefruit:~ pete$ curl -I http://someurl HTTP/1.1 301 MOVED PERMANENTLY Date: Fri, 16 Oct 2009 19:01:08 GMT Server: Apache/2.2.9 (Win32) mod_wsgi/2.5 Python/2.6.2 PHP/5.2.6 Location: http://someurl Content-Type: text/html; charset=utf-8 I can't get the page's content ...

Trying to use cURL post-callback.c for http form submision.

Hi! I'm trying to use the cURL post-callback.c ex to submit a local html form to a remote form script. I need to know what the script does with the URL/httpheader after it is done handling the post so I know if the post succeeded or not (went to success page). I can't figure out exactly how to write the data I need posted. (syntax, meth...

pycurl installation on Windows

I am not able to install pycurl on Windows on Python2.6. Getting following error: C:\Documents and Settings\vijayendra\Desktop\Downloads\pycurl-7.19.0>python setup.py install --curl-dir="C:\Documents and Settings\vijayendra\Desktop\Downloads\ curl-7.19.5-win32-ssl\curl-7.19.5" Using curl directory: C:\Documents and Settings\vijayendra\D...

Download file using libcurl in C/C++

Hi! I am building an application (on windows using Dev-C++) and I want it to download a file. I am doing this using libcurl (I have already installed the source code using packman). I found a working example (http://siddhantahuja.wordpress.com/2009/04/12/how-to-download-a-file-from-a-url-and-save-onto-local-directory-in-c-using-libcurl/)...

C++ libcurl console progress bar

I would like a progress bar to appear in the console window while a file is being downloaded. My code is this: http://stackoverflow.com/questions/1636333/download-file-using-libcurl-in-c-c/1636827#1636827. How to have a progress bar in libcurl? ...

If libcurl is enabled, can i assume that all setopt options are available?

If server has php libcurl enabled, does it have all setopt options available (unless something new was added in new libcurl version and server didn't upgraded, of course) or is it possible for admins to turn off parts of functionality? I'm especially thinking about CURLOPT_HTTPHEADER - can i assume that if i'll be running my script on s...

Including libcurl in project

So I downloaded the zip file from the curl website. I copied the directory with all of the header files into my include directory. Including the curl.h works with no problems, however, when I go to actually call a function, suddenly my c++ app will no longer compile. Here's the error I'm receiving: [Linker error] undefined referenc...

Simple telnet example in LIBCURL - C++

I need to fing simple TELNET example in LIBCURL (curl.haxx.se/libcurl) (C++) I searched over this site, but I don't found any simple example. I need only to connect to TELNET, authenticate, and send message. Thanks ...

Finding out where curl was redirected

I'm using curl to make php send an http request to some website somewhere and have set CURLOPT_FOLLOWLOCATION to 1 so that it follows redirects. How then, can I find out where it was eventually redirected? ...

CUrl PUT with xml data

Hi I'm facing a problem with curl as I am unable to issue a PUT request with inline XML data, I'm not sure how its done but I hade a couple of goes on it with different techniques. First I tried using the CURLOPT_UPLOAD as its the default CURL option for PUT and tried to append the xml data manually: typedef map<string, string> hea...

Automatic Web Form Submission (looking at Javascript, but other methods are welcome)

What is the most efficient way to do automatic form submission? I'm doing this for fairly legit purposes (well, the site concerned doesn't have an option to send mails to a large group of people, so I'm trying to make my own workaround. But it's not for spamming.) I do remember -- from my days spent playing web-based MMORPGS -- that the...

How can I add libCurl to a Borland C++ Builder 6 Project?

How can I add libCurl to a Borland C++ Builder 6 Project? I tried including its directory in the project's compiler and linker search paths, then I made a lib from the libcurl dll and I added it to the project, I'm trying to get a piece of sample code to compile, but it throws on error that it doesn't find curl/curl.h in the line #includ...

PHP Curl POST Problem Causing PHP to use 100% CPU

I'm trying to upload data with POST to my webserver but sometimes cURL just stalls and causes PHP to use 100% CPU indefinitely. I'm using the code below. $curl = curl_init(); curl_setopt($curl, CURLOPT_URL, $URL); curl_setopt($curl, CURLOPT_POST, true); curl_setopt($curl, CURLOPT_CONNECTTIMEOUT, 5); curl_setopt($curl, CURLOPT_POSTFIELD...