cURL is an HTTP client library and command line tool.

learn more… | top users | synonyms

12
votes
2answers
7k views

Difference between `curl -I` and `curl -X HEAD`

I was watching the funny server type from http://www.reddit.com with curl -I http://www.reddit.com when I guessed that curl -X HEAD http://www.reddit.com would do the same. But, in fact, it doesn't. ...
8
votes
4answers
20k views

How do I make cURL use keepalive from the command line?

I'm trying to verify that HTTP persistent connections are being used during communication with a Tomcat webserver I've got running. Currently, I can retrieve a resource on my server from a browser ...
7
votes
5answers
28k views

cURL or SSL problems, how to solve?

I keep getting this error: No cURL data returned for https://XXX.XXXX.XXX:XXXX [0] SSL certificate problem, verify that the CA cert is OK. Details: error:14090086:SSL ...
7
votes
3answers
10k views

How to update cURL CA bundle on RedHat?

I am running into issues where the CA bundle that has been bundled with my version of cURL is outdated. curl: (60) SSL certificate problem, verify that the CA cert is OK. Details: error:14090086:SSL ...
7
votes
3answers
17k views

Ubuntu 10.04/CURL: How do I fix/update the CA Bundle?

I recently upgraded our server from 8.04 to 10.04, and all the software along with it. From what I've found online, it seems that the new version of CURL doesn't include a CA bundle, and, as a ...
7
votes
4answers
6k views

How is it possible that I can do a host lookup but not a curl?

Has anyone ever seen this before? Note that this happens not only with google.com, but with every domain I try. It's a wireless connection (WEP), but I'm not sure how that would be relevant: $ curl ...
6
votes
2answers
7k views

Curl: disable certificate verification

I am developing and I need to access https://localhost. I know the certificate will not match. I just want curl to ignore that. Currently it gives me the following error message: curl: (51) SSL peer ...
6
votes
1answer
430 views

DNS issues on Google compute engine

I'm experiencing some interesting network issues, which I can reproduce and work around, although not explain - therefore I ask you! :) I have a setup with two servers, both located in Google's ...
5
votes
1answer
3k views

Trying to install pecl Solr extension but it needs curl

When I try to install solr-beta: pecl install solr-beta I get this error: pecl/solr requires PHP extension "curl" No valid packages found install failed The thing is curl is already installed and ...
5
votes
2answers
2k views

Why is my new Ubuntu 12.04 unable to verify a Verisign ssl certificate?

In short: This request fails. $ curl 'https://secure.ogone.com/ncol/prod/orderstandard.asp' -vv * About to connect() to secure.ogone.com port 443 (#0) * Trying 213.254.248.101... connected * ...
4
votes
2answers
937 views

Brew install imagemagick curl fails

I am getting the following error when trying to install imagemagick via brew on OS X Mountain Lion. It appears to be a curl error - hence why it's on SF not another of the Stack Exchange sites. brew ...
4
votes
3answers
8k views

how do I get curl to save a file to a specified directory? [closed]

I'm trying to get curl, using a script, to download a file and save it to a certain directory. I got it to download but I dont know how to get it to a certain directory from a script. It usually just ...
4
votes
2answers
957 views

Why are DNS lookups not respecting /etc/nsswitch.conf & /etc/host.conf?

I have an issue where hostnames are being looked up from DNS even though they are present in /etc/hosts. I have the following configured: /etc/host.conf: order hosts,bind /etc/nsswitch.conf: ...
3
votes
2answers
686 views

Download urls listed in a file using curl?

I have a file that has all the urls from which I need to download. However I need to limit one download at a time. i.e. the next download should begin only once previous one is finished. Is this ...
3
votes
2answers
3k views

How do I pipe the output of uptime/df to curl?

I want to send the output of uptime and df commands to a web app using cURL. I tried: uptime | curl http://someurl.com -T - But that didn't seem to send the data. What is the proper way to send ...
3
votes
1answer
3k views

Install Composer on Ubuntu

I am trying to install composer with the command: sudo curl -s https://getcomposer.org/installer | php And I am getting this error: All settings correct for using Composer Downloading... Download ...
3
votes
2answers
2k views

How to test a HTTPS URL with a given IP address

Let's say a website is load-balanced between several servers. I want to run a command to test whether it's working, such as curl DOMAIN.TLD. So, to isolate each IP address, I specify the IP manually. ...
3
votes
4answers
508 views

Download a file from the shell when button click is required

I have a link to a file that I would like to download from the shell. Unfortunately, the URL redirects to a software license agreement page which requires clicking an accept button. This is fine when ...
3
votes
3answers
4k views

How to change libcurl SSL backend from gnutls to openssl on Ubuntu server

I am getting gnutls specific errors in my Tornado webserver while processing Google OpenID SSL responses. One of the suggestions I got from Tornado mailing list is to try OpenSSL backend instead of ...
3
votes
3answers
3k views

How can I download multiple files stored in a text file with curl and xargs?

How can I download multiple files stored in a text file with curl and xargs? This is my last trial: cat listfile.txt | xargs curl -O first file works well, but other files are just output to ...
3
votes
2answers
629 views

Curl always returns same 404 page

No matter what URL I specify for curl I always get the same HTML 404 Error page back. If I use the --verbose option, it looks like curl always connects to the same IP address. $ curl --verbose ...
3
votes
4answers
3k views

Why does squid reject this multipart-form-data POST from curl?

This fails: $ curl --trace multipart-fail.log -F "source={}" http://127.0.0.1:3003/jslint With a squid status 417 error, ERR_INVALID_REQ. trace of failing curl request trace of successful curl ...
3
votes
2answers
7k views

How can I capture output from LFTP? (Output not written to STDOUT or STDERR?)

I would like get access to progress information from lftp. Currently, I'm using curl like so: curl http://example.com/file -o file -L 2> download.log This writes curl's progress information to ...
3
votes
1answer
200 views

Why does curl give a different response for $_SERVER['REQUESTI_URI'] than browsers?

I have a simple test PHP page: <?php echo $_SERVER['HTTP_HOST'] . '<br/>'; echo $_SERVER['REQUEST_URI']; ?> When I access this page with a browser (I've tested chrome, and links) it ...
3
votes
2answers
1k views

OpenSSL issues in Debian Wheezy

I don't know what is exactly going on but I noticed that curl couldn't get secure pages without adding extra switches. ~# curl -v https://api.dreamhost.com * About to connect() to api.dreamhost.com ...
3
votes
2answers
3k views

NTLM with cURL returns 401

Goal: connecting to an Exchange server (EWS) Method: cURL Problem: Cannot get authenticated (NTLM), request returns 401.1 There seems to be an old, well documented 2 issue that started with cURL's ...
3
votes
0answers
89 views

How to use Chrome's CRL sets (or some master CRL list) as a CRL file?

I am looking for a master CRL list. The closest thing I have found is the Chromium project's CRLSets. I used crlset-tools to get the crlset (crlset fetch > crl-set) and then dumped the serial ...
3
votes
1answer
190 views

Problems restarting Apache - Curl related

I'm having a problem compiling LAMP, I have everything compiled and working, but when I try to restart apache I get the following error: seg fault or similar nasty error detected in the parent ...
2
votes
5answers
2k views

Multithreaded downloading with shell script

Let's say I have a file with lots of URLs and I want to download them in parallel using arbitrary number of processes. How can I do it with bash?
2
votes
1answer
3k views

How to enable curl, installed Ubuntu LAMP stack?

I have installed ubuntu Lamp stack.But the curl is not enabled neither i can find extension listed in the INI file, i added manually but it didn't worked too. How should enable Curl then ?
2
votes
2answers
6k views

Ubuntu 11.10, using wget/curl fails with ssl

On a completely new install of Ubuntu I'm getting the following errors when using wget: wget https://test.sagepay.com --2012-03-27 12:55:12-- https://test.sagepay.com/ Resolving test.sagepay.com... ...
2
votes
1answer
610 views

Using curl to make a HEAD request with a hard timeout

I'd like to use curl to send a HTTP HEAD request to a URL to verify that it is working correctly (server is up and sends a successful response). At the end, I need the final HTTP response code ...
2
votes
1answer
4k views

How to log outgoing http requests from PHP + cURL?

I have a PHP script set up that makes cURL requests whenever an action is performed on a site. The problem is that the information is being POSTed twice whenever the action is run. I need to work ...
2
votes
2answers
5k views

Alternatives to CURL, WGET

Is anyone aware of any alternatives to curl and wget? The key functional requirement I'm looking for is to be able to execute an HTTPS GET request against a known URL. The reason I'm looking for an ...
2
votes
2answers
958 views

WHM: how to add curl extension to PHP?

i need curl installed on php. how can i add it using WHM? and does it have any security issue or may couse problem for accounts on the shared host?
2
votes
1answer
46 views

Capturing output of 'at'

How can I log the output of a command executed by at? This command is actually being exec()'d by PHP as in: <?php exec('echo "curl -k https://localhost/projekt/crons/purge/5" | at now + 5 ...
2
votes
1answer
3k views

How to install PHP from source with latest cURL package on Linux?

I simply have to use the latest cURL version (7.21.3) with PHP on my webserver. (Has to do with specific bug fixes) It is not available by default on most current Linux variant repositories. (Natty ...
2
votes
2answers
982 views

Retrieve FTP directory tree from the command line

What would be the fastest way to recursively retrieve entire directory listing from an ftp server using wget/curl/whatever? I don't need to download any files, just directory and file names. Basically ...
2
votes
5answers
5k views

Curl development headers with SSL support for Phusion Passenger 3

I'm trying to install phusion passenger nginx module, but it fails # passenger-install-nginx-module * Curl development headers with SSL support... not found ... yum install curl-devel Setting up ...
2
votes
1answer
3k views

Root cause of “curl: (56) SSL read: errno -5961” errors

I was evaluating some SSL failures, and noticed that when I use curl to one of the failing sites, I got curl: (56) SSL read: errno -5961; however, my google queries for that error didn't show the ...
2
votes
1answer
682 views

file_get_contents url wrappers work on cli but not cgi

I have a big problem. I have just upgraded to a new dedicated server running Plesk 10, and Ubuntu 11.04 and my scripts can't run file_get_contents or curl to external urls in cgi mode. ...
2
votes
4answers
1k views

Install Fedora Source package on RHEL / CentOS

I'm attempting to upgrade curl on RHEL / CentOS machines. I've found what seems to be the appropriate source packages in a number of repos. (ie, ...
2
votes
1answer
1k views

Do I need to recompile PHP to make use of CURL API?

I have both Apache and PHP set up manually, albeit the latter without CURL. There is this jungle of instructions and explanations on extensions for PHP. I have a very straightforward question - what ...
2
votes
1answer
1k views

How to install PHP cURL on IIS?

How do I go about installing PHP cURL on IIS? I have copied the php_curl.dll file into the PHP extensions folder, what else do I need to do? Thanks
2
votes
1answer
478 views

using curl against my IDN doesn't work right; browsers are OK

I've registered www.❺➠.ws, which goes to the same IP as www.naildrivin5.com. curl www.❺➠.ws returns the homepage of www.naildrivin5.com. No problem. I modify apache to use name-based virtual ...
2
votes
1answer
88 views

Editing hosts file of my Mediatemple DV container

I have a PHP script in a Mediatemple (dv) server that uses cURL to post data to a remote website. This remote website also resides in a (dv) server and doesn't have a domain name yet. I can only ...
2
votes
2answers
2k views

WGet or cURL: Mirror Site from http://site.com And No Internal Access

I have tried wget -m wget -r and a whole bunch of variations. I am getting some of the images on http://site.com, one of the scripts, and none of the CSS, even with the fscking -p parameter. The ...
2
votes
1answer
249 views

How to make a POST request using the Collectd curl plugin?

How do I make a post request using the curl plugin? I see no option where I can specify the post data, or the type of request. Is it even possible with the plugin, or is there an alternative plugin I ...
2
votes
2answers
1k views

SSL / HTTP / No Response to Curl

I am trying to send commands to a SOAP service, and getting nothing in reply. The SOAP service is at a completely separate site from either server I am testing with. I have written a dummy script ...
2
votes
1answer
38 views

Is it necessary to validate the file integrity when curl succeeded

I have a bunch of files on S3, and I need to download and update them via command line (BASH) on several devices. What I do (as of now): Request the header of the file with -I and extract the ETag ...