curl

post to form dynamically using curl and set div to show with a cookie

Hi I have a two part question. Using Curl is it possible to use a textbox on another page or site or div, that captures user input and posts it to a Stack Exchange / Stack Overflow 'Ask Question' Page so that the title of the question is then populated. something along the lines of http://stackoverflow.com/questions/ask?questiontit...

Downloading multiple pdf files using wget fails (403 error)

I'm trying to download multiple pdf files from a web page (I'm using Mac OS X 10.6.1). Here is a example what I'm getting (www.website.org is just for example): ~> wget -r -A.pdf http://www.website.org/web/ --2009-10-09 19:04:53-- http://www.website.org/web/ Resolving www.website.org... 208.43.98.107 Connecting to www.website.org|208....

CURL fails to send post data over 1024 bytes via command line

I am trying to post a large XML file to a web address by using curl in a shell script. I am posting the data using the '-F' option in curl. Whenever I post a file larger than 1024 bytes, the file gets cut off and only sends the first 1024. I've tried changing the "Expect:" header as suggested in another solution for PHP Curl, but it d...

PHP Screen Scraping and Sessions

Ok still new to the screen scraping thing. I've managed to log into the site I need but now how do I redirect to another page? After I login I'm trying to do another GET request on the page that I need but it has a redirect on it that takes me back to the login page. So I'm thinking the SESSION variables are not being passed, how can ...

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...

retrieving POST information from a cURL request

i'm supposed to come up with a dialog with another developer's script (from another company) so, here's the basic rundown: 1) i send a request to http://some-url.com?param=foo 2) he sends me info back in the POST fields the question i have is, how do i directly access the POST array that is sent back to me? lets say his POST field is ...

twitter api post being cut off

I use the below code to post updates to twitter: // Set username and password for twitter API $username = '***'; $password = '***'; // The twitter API address $url = 'http://twitter.com/statuses/update.xml'; // Alternative JSON version // $url = 'http://twitter.com/statuses/update.json'; // Set up a...

properly endcoding & for twitter post

My automated call to the Twitter API causes problems when my update string has a & in it. How do I properly encode my update string $update that contains a & before I use CURL to call the Twitter API? // Set username and password for twitter API $username = '***'; $password = '***'; // The twitter API address $url ...

Automatic Website Login using cURL

Hey all. I've been looking for a while for something that can help me out with this. I'm writing a script that will login to Gamefly.com, and add 50 games to my queue. The queue part works fine enough, but the login simply won't work. I've read about using cURL before, and I noticed that PHP has a decent enough time with it. So here's w...

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...

CURL Authentication being lost?

I am authenticating a login via CURL just fine. I have a variable I am using to display the returned HTML, and it is returning my user control panel as if I am logged in. After authenticating, I want to communicate variables with a form on another page within the site; but for some reason the HTML from that page is returning a non-authe...

libcurl and amazon s3

Hi I am wondering if there is a way to set two different write callback functions in libcurl. The problem is that I'm currently using libcurl to communicate with amazon s3 for various operations, creating buckets, uploading, deleting and downloading objects. The problem is with the download function, I have set a callback function to wr...

cURL php extension for windows with SCP and SFTP support

I switched over to zendserver(VS8 php(5.3) binaries), and now curl(7.19.4) seems to be lacking SCP and SFTP protocol support(verified by errors and phpinfo). Curl itself is installed correctly, it's just lacking the protocol support mentioned. This worked out of the box on the VC9(thread safe) binaries I downloaded off php.net(this ins...

request.format returning */*

Good afternoon, I'm currently developing an API for my application on RoR As an example, I created some XML, loaded with all the info I need to create the object, let's say a Person, and using Curl I submitted it to my application I'm able to call exactly the create action I want from the controller and the hash params of the object a...

Need to carry on browser "session" when calling another php script through CURL

I have a "primary" PHP script (actually a set of scripts) all of whom the user interacts with through the browser. I've had no problems using the site as the session information works from page to page. However, one of the scripts needs to directly call another "secondary" php script on my site using CURL and that "secondary" script nee...

Windows 7 OpenLDAP Curl DLL Dependency Hell

Hi, I really hope someone can be of help to me because this problem has me totally stuck and frustrated. Yesterday I installed a fresh and shiney new Windows 7 x64 onto a development box. I got VS2008 installed, Tortoise SVN, did a checkout, compiled my currently project, all fine and dandy. But when I go to run (either F5 in VS or ...

ASP.NET MVC - Using cURL or similar to perform requests in application

Hello There, Actually I'm building an application in ASP.NET MVC (using C#) and I would like to know how I can perform calls like curl http://www.mywebsite.com/clients%5Flist.xml inside my controller Basically I would like to build a kind of REST API to perform actions such as show edit and delete, such as Twitter API. But unfortunately...

php CURLOPT_INFILE gives error The FastCGI process exited unexpectedly

for sending data with curl PUT request , I am using below code $tenMB = 10 * 1024 * 1024; $fh = fopen("php://temp/maxmemory:{$tenMB}",'rw'); fwrite($fh, $this->putFields); rewind($fh); curl_setopt($this->_handle, CURLOPT_INFILE, $fh); // this line throws error I am getting below error on IIS 7 HTTP Error 500.0 - Internal ...

CURL as a download manager with multiple connections and progress display in PHP

Hi, I wanted to use the CURL extension for PHP to create some sort of download manager and I was thinking if CURL allowed to implement these 2 features I'm thinking about: 1) Multiple connections or multi-part download just like a normal desktop applications download manager. 2) Constantly update on screen (text or graphical, doesn't ...