curl

extension file "curl" is must be loaded

Using XAMPP 1.6.7 I installed the community version of Magento. But there seems to be a problem. I am getting the error message 'extension file "curl" is must be loaded'. In another computer, everything seems fine. (the other computer) intel(R) Pentium(R) Dual CPU, E2140 @ 1.60Hz, 1.60 GHz. 504 MB of RAM and XP professional 2002 sp2 My...

Mixing multiple values for the same key and file uploads using cURL and PHP

I’ve run into a limitation in the cURL bindings for PHP. It appears there is no easy way to send the same multiple values for the same key for postfields. Most of the workarounds I have come across for this have involved creating the URL encoded post fields by hand tag=foo&tag=bar&tag=baz) instead of using the associative array version o...

C++ 'GET' request or how do you download files to work with in C++?

Alright I've spent a good three days trying this, here's the scenario: I want to download a '.csv' file from Google and then do stuff with the data from the file. It's for a Win32 Console Application. I have the latter down, I just cannot for the life of me figure out how to download the file. I've heard of libcurl, curlpp, ptypes, roll...

Emulating HTTP POST using command line curl and exporting output to text file

How do I emulate an HTTP POST request using curl and capturing the result on a text file? I already have a script called dump.php: <?php $var = print_r($GLOBALS, true); $fp = fopen('raw-post.txt','w'); fputs($fp,$var); fclose($fp); ?> I did a simple test by doing: curl -d 'echo=hello' http://localhost/dump.php but I didn't ...

using Live HTTP Headers

On a website, I enter some parameters in a form, click on search and then get a page with a message "retrieving your results". After the search is complete, I get another page with my results displayed. I am trying to recreate this programatically and I used Live HTTP Headers to get a peek of what is going on behind i.e the url, form ...

php server-to-server post?

Hello, I'd like to have one server make an http post request to another server. Can I do this with a basic php install (Dreamhost in my case)? If so, please point me in the right direction! thanks, -Morgan ...

Screen Scraping

Hi friends , now i learn cURL , i face one difficult that is to login into a page by username and password directly ...

PHP HTTP POST fails when cURL data > 1024

Note: solution at the end If I attempt to do a HTTP POST of over 1024 characters, it fails. Why? Here is a minimal example: recipient.php: <?php if (strlen(file_get_contents('php://input')) > 1000 || strlen($HTTP_RAW_POST_DATA) > 1000) { echo "This was a triumph."; } ?> sender.php: <?php function try_to_post($char_count) { $u...

curl and php problem -- blank page

I am attempting to download images saved in a url to a local folder, and have made the following attempt at doing so with curl. I would like to know if it is necessary to include curl or download it seperateley, or if my function will just work. I would like to know if there are any obvious problems with my implementation below. I am awa...

Why won't my Gmail login work using PHP and CURL?

I'm implementing one project using PHP, in that I want to login into a page automatically . The code is below. $ch = curl_init(); $postdata="Email=$username&Passwd=$password&continue=https://www.mail.google.com"; curl_setopt ($ch, CURLOPT_URL,"https://www.google.com"); curl_setopt ($ch, CURLOPT_SSL_VERIFYPEER, FALSE); curl_setopt ($ch,...

How to read the header with pycurl

How do I read the response headers returned from a PyCurl request? ...

file upload status information

Hi, Im making a small python script to upload files on the net. The script is working correctly, and now i want to add a simple progress bar that indicates the amount of uploading left. my question is -how do i get the upload status information from the server where im uploading the file, assuming it is possible...im using curl and pyc...

Can I make more then one request on a curl connection?

In PHP (v5), is there a way to make multiple requests on an open curl connection? I'm noticing that my big bottleneck is the timeout/teardown of the connection its self (i'm making lots of small data requests that finish quickly), so I would like to be able to do something like open init curl connection, set url/params, do request, ge...

Is it possible to set a cookie for a site /server other than you own?

Here's the quick version of my question: Is it possible to set a cookie somehow into a client's browser when the cookie is for use with a different server (in this case an Exchange mail server)? In this scenario the server trying to set the cookie is at "intranet.myschool.edu" and the exchange server is at "owa_server.myschool.edu". ...

cURL changing the URL after POST

I am doing an HTTP POST using cURL $url = "http://localhost:8080/~demo/cgi-bin/execute/100"; //open connection $ch = curl_init(); //set the url, number of POST vars, POST data curl_setopt($ch,CURLOPT_URL,$url); curl_setopt($ch,CURLOPT_POST,count($data)); curl_setopt($ch,CURLOPT_POSTFIELDS,$data); //execute post $result = curl_exec($c...

what is the most efficient way to fully resolve a url (using php and curl)

I'm looking for the most effecient way to resolve a given url to its final end point, following all 30x redirects and location headers. Basically, I have a bunch of URLs like http://foo.com that when you go to them, they end up at a page like http://foo.com/Welcome.html and i need to find that last url. right now, i'm using CURLOPT_FOL...

cURL login to login.live.com

I I'm trying to login to live.com via cURL Has anyone tried that before? Could you then post your script? Thanks I'm now using this command... curl --cookie cjar3 --cookie-jar cjar3 --data 'PPSX=P&PwdPad=&type=&[email protected]&passwd=xxxxxxxxx&SI= Accedi &radio=2' --location --output /home/mauripz/temp/Nuova/loginresult.html ...

A replacement for python's httplib?

I have a python client which pushes a great deal of data through the standard library's httlib. Users are complainging that the application is slow. I suspect that this may be partly due to the HTTP client I am using. Could I improve performance by replacing httplib with something else? I've seen that twisted offers a HTTP client. It ...

what is the correct way to send post data with cURL in PHP?

when using cURL in php to send data in a POST, you use set the cURL option CURLOPT_POSTFIELDS to the data here's some example data array('foo'=>'bar','ninja'=>'pirate') now here's where i'm confused. half of the example code i've seen do some preprocessing on the array, and encode and smush the data into a properly formatted url strin...

reading SSL page with CURL (php)

Hi, I am trying to download the content of a secure (uses https) webpage using php and curl libraries. However, reading failed and I get error 60: "SSL certificate problem, verify that the CA cert is OK." also "Details: SSL3_GET_SERVER_CERTIFICATE:certificate verify failed" So...pretty self explanatory error msg's. My question is: H...