cURL is a CLI tool for issuing HTTP GET, POST, & PUT request.

learn more… | top users | synonyms

0
votes
2answers
583 views

Curl. Check redirect

Lets suppose that we have 3 links: link1, link2, link3. link1 redirects to link2 and link2 redirects to link3. So how to see that with curl?
2
votes
2answers
2k views

Running thousands of curl background processes in parallel in bash script

I am running thounsand of curl background processes in parallel in the following bash script START=$(date +%s) for i in {1..100000} do curl -s "http://some_url_here/"$i > $i.txt& ...
1
vote
1answer
205 views

curl ignores interface parameter

My Ubuntu 12.04 laptop is connected to the Internet by WiFi and to the intranet by cable. I would like to get the content of an intranet site via curl and have tried the following: curl --interface ...
0
votes
0answers
296 views

libcurl4-gnutls-dev : Depends: libldap2-dev but it is not going to be installed

I am trying to install curl in my ubuntu server as I was getting this error whenever I am compiling my C++ code - fatal error: curl.h: No such file or directory Below is the error: ...
0
votes
2answers
865 views

update curl on centos5

i have centos 5.9, with curl 7.15.5. i need curl 7.16.2+ . i'm a novice webmaster...if that. but would like to try. what are the commands to add a yum rpm repo so i can update the curl version, if ...
7
votes
3answers
12k views

Does curl have a timeout?

So far I couldn't find anything really, but is it true that curl doesn't really time out at all? user@host:~# curl http://localhost/testdir/image.jpg I'm asking because I'm redirecting any request ...
0
votes
0answers
314 views

Difference between curl -d `data` and curl -d @file

I would like to convert my configuration files for ElasticSearch from JSON to YML. I am using curl for all REST related opertions overhanding the file via $ curl -X PUT ...
2
votes
1answer
678 views

download pdf files from using curl

How to download hundereds of .pdf files from http://www.ncbi.nlm.nih.gov/pmc/articles using a loop, for example for the following document ids: PMC3386155 PMC3625956 PMC3477654 PMC3531051 ...
2
votes
1answer
185 views

How to download .pdf files from pubmed

I can't download .pdf files from http://www.ncbi.nlm.nih.gov/pmc/articles, I already have some document IDs such as PMC3404089. I tried to issue the following command: curl -o file.pdf ...
1
vote
4answers
560 views

Write output of wget or curl to a custom filename based on the url

For example I have a link http://www.abc.com/123/def/ghi/jkl.mno. I want to download it using wget or curl and get the name of output file as def_ghi_jkl.mno, where the part def_ghi is taken from the ...
3
votes
3answers
1k views

Curl with ipv6 not working by default

I am trying to curl ipv6 addresses, but without success. If I try lets say: curl https://google.com I wait for a timeout and get network unreachable If I force ipv4, everything is fine. ...
1
vote
1answer
459 views

How to figure out where a link gets redirected

I currently working on a script that updates a file. The file has several versions. The important ones have static links. These get redirected to the actual file which then gets downloaded using wget. ...
7
votes
2answers
9k views

Any way to encode the url in curl command?

I have some url which has space in it's query param. I want to use this in curl, e.g. curl -G "http://localhost:30001/data?zip=47401&utc_begin=2013-8-1 00:00:00&utc_end=2013-8-2 ...
2
votes
1answer
273 views

Given a mime-type get the corresponding file extension

I want to download I file using curl to a temporary directory with the appropriate extension. Currently I do something like this: tmp="$(mktemp -t 'curl')" curl -o "$tmp" ...
1
vote
3answers
4k views

Health check of web page using curl

I'd like to do a health check of a service by calling a specific url on it. Feels like the simplest solution would be to use cron to do the check every minute or so. In case of errors, cron sends me ...
2
votes
2answers
1k views

twitter status updates from command line (via cURL) [duplicate]

Based on some samples: http://www.commandlinefu.com/commands/view/176/update-twitter-via-curl I'm trying to update my twitter status from command line (via cURL), but always get error. Any idea what ...
0
votes
2answers
464 views

how do I get the response ouput from the url .download it in file,not download the code

My file like this with some number or id 404000847307897 404000857827460 404001044194601 404000835511595 404000338418501 404000338654003 404000290144612 404000344175621 404000290144612 ...
5
votes
2answers
198 views

cURL <- feature

$ cat file | curl -F 'sprunge=<-' http://sprunge.us So the output of echo gets passed as a POST parameter to cURL. Is this a cURL specific feature?
1
vote
1answer
291 views

pipe curl colored output

this is the script color #!/bin/bash ESC_SEQ="\x1b[" COL_RESET=$ESC_SEQ"39;49;00m" case $1 in red ) COL_START=$ESC_SEQ"31;01m" ;; green) COL_START=$ESC_SEQ"32;01m" ;; yellow ...
0
votes
1answer
264 views

403 http code appears when I go to a certain website

I wrote a PHP script to a particular site using a home computer for debugging. Script worked properly, when I tested it on a home computer. The script has stopped working when I deploy the script on ...
1
vote
1answer
410 views

CURL command execution

Can anyone explain me the below curl command and how it works : STATUS_CODE=`curl –output /dev/null –silent –head –write-out ‘%{http_code}\n’ $next` # If you want to set a timeout then add –max-time ...
2
votes
1answer
464 views

Why is wget skipping files while trying to mirror a site

I ran wget on this site: http://demo.codestag.com/geeklove/ but it only returns a single index.html wget --recursive --no-clobber --page-requisites --html-extension --convert-links ...
0
votes
2answers
1k views

Git pull error libcurl.so.3 not found

I have a php script to git pull from my github repository set up in my webservice hook urls like so: <?php echo shell_exec('~/git/usr/bin/git pull 2>&1'); ?> When I open this script ...
7
votes
1answer
4k views

Passing binary data to curl without using a @file

Is it possible to use curl and post binary data without passing in a file name? For example, you can post a form using binary via --data-binary: curl -X POST --data-binary @myfile.bin http://foo.com ...
1
vote
2answers
99 views

Using curl sequences without knowing the ending point

Is there a way in curl to use sequences but not give it a maximum value? So that it will download everything from the start of the sequence up? For example: curl ...
0
votes
1answer
56 views

How to change yum's default downloader

By default yum uses curl to download packages from internet repositories. I want use axel instead of curl to download packages: is it possible?
1
vote
2answers
481 views

Name Lookup takes a long time

I was using a script that uses curl. Quite often curl fail. The error is name lookup timed out I tried to ping google.com and and other sites. Indeed dns (or whatever do the translation from domain ...
4
votes
3answers
2k views

How to download videos from Coursera with curl?

Downloading videos from Coursera is not as easy as copy and pasting the link in terminal. I also have tried exporting cookies from my browser in cookie.txt file and doing a: curl --cookie cookie.txt ...
41
votes
2answers
35k views

Does curl have a --no-check-certificate option like wget?

I am trying to make a curl request to one of our local development servers running a dev site with a self-signed SSL cert. I am using curl from the command line. I saw some blog posts mentioning that ...
4
votes
3answers
223 views

Send first line of the HTTP Header

A normal HTTP request may look something like this: GET / HTTP/1.1 Host: example.com I would like to change the first line of this request, with a custom one, e.g.: FOOBAR NOT REALLY HTTP Host: ...
0
votes
1answer
828 views

make install - how to use wget, not curl

I do not have root access on my Ubuntu but want to install git. I was following this tutorial but when running make or make install it says curl is not installed. Can I use wget instead if this is a ...
1
vote
1answer
5k views

Automated SFTP upload with curl

I want a file to be uploaded daily to remote server using automated ftp command. Can someone please help me on this below command to check whether it's right or wrong? curl -Tu username:password ...
2
votes
1answer
475 views

Strange issue with curl/lynx and non resolving domains

I have a weird issue on my server in that if I use curl or lynx to try and access a URL that doesn't exist (say a non registered domain, or a domain that's not in DNS), I don't get an error, it ...
6
votes
2answers
861 views

Pipe Password to Application When Asked

The following should be done in a bash script: curl --digest --user schmijos https://bitbucket.org/u/p/get/tip.zip -o tip.zip How can I automatically submit a password to curl when it asks for it? ...
7
votes
6answers
1k views

Is there a way to use curl interactively? Or is there an interactive curl/wget shell?

Imagine something like this: $ curlsh http://www.example.org > GET /foo/bar/bam ...output here... > POST /thing/pool ... ... result here.... is there a tool that lets me do that?
2
votes
2answers
4k views

How can I install php5-curl on Ubuntu 12.04 LTS (GNU/Linux 3.2.0-24-generic x86_64)

I have a working server running Ubuntu 12.04 LTS (GNU/Linux 3.2.0-24-generic x86_64), including apache and php. Now I want to add curl support for php by running this: apt-get install php5-curl ...
2
votes
1answer
185 views

Is there a way to control the speed at which Curl reports progress?

I'm using Curl in Cygwin to automate a daily download. I want to keep progress in a log but Curl is just a little too noisy for my taste. I tried man curl and Google, but didn't find anything. Can I ...
2
votes
1answer
2k views

How can I queue up an entire directory for FTP?

Currently I know how to do this: curl -T file.zip ftp://server.domain.com/ --user username:password Which will let me do a single file. However I can't figure out how to do it for a directory. I ...
1
vote
1answer
1k views

cURL socks5 proxy: “Empty reply from server”

I'm accessing an http resource using Chrome, FoxyProxy without any problems. The proxy is defined as socks5 in the standard port 1080. I've tried accessing the same resource using cURL (actual URLs ...
1
vote
1answer
779 views

How can I update certificates on my system to fix wget's error: “Unable to establish SSL connection.”?

Sometimes I notice that I am unable to connect via SSL with curl and wget to websites that have certificates that should be valid. One example might be https://squareup.com/ which has a Verisign ...
2
votes
1answer
524 views

Predict filename before downloading from a URL, in shell script

I have a shell script that downloads files from a list using wget, and resumes automatically if there is any non-critical error (because of unstable WIFI during storms). The problem is, I want to ...
4
votes
1answer
721 views

'watch'-ing curl yields unexpected output

I'm trying to watch curl for live feedback on HTTP tweaks. However, when I execute the command, the output is garbled with some download stats. I've tried sending curl's stderr to /dev/null, to no ...
37
votes
3answers
8k views

What is the difference between curl and wget?

I am keen to know the difference between curl and wget. Both are used to get files and documents but what the key difference between them. Why are there two different programs?
1
vote
3answers
2k views

Curl not found (Glype)

I'm trying to install proxy software called Glype on my server. It continues to tell me that "Glype requires cURL/libcurl". I have the latest version of curl installed. Why might this be happening? ...
7
votes
5answers
1k views

Read and confirm shell script before piping from curl to sh (curl -s [url] | sh)

Whenever I have to execute a shell script from the web curl -s [url] | sh, I first open url in my web browser to make sure the script isn't malicious and is safe to run. I remember seeing a command ...
2
votes
0answers
267 views

Nagios not running notify command

I am in the process of creating a notify command for our Nagios server to notify us via our Kannel SMS sender. This is what I got so far: /usr/local/bin/curl -v -G -d 'username=user' -d ...
8
votes
2answers
5k views

Get URL's redirect target with curl

I would like to check where a single URL redirects. An example of that could be a link from Google's search result page (where a click always goes through Google server). Can I do that with curl?
6
votes
3answers
1k views

How to tweet using terminal?

I would like to tweet a message using terminal. I tried something like: curl -u 'TwitterUsername':'TwitterPassword' -d status=”Your Message Here” https://twitter.com/statuses/update.xml but seems ...
2
votes
2answers
676 views

what does Curl's stand-alone hyphen (-) mean?

what's the stand-alone hyphen (between the -C & -O) stand for in this command? curl -C - -O http://www.intersil.com/content/dam/Intersil/documents/fn67/fn6742.pdf FWIW- I'm following a ...
6
votes
2answers
2k views

Can't understand this script. bash <<(curl -s http://xxx.com)

In a rails book, the author wrote the script to install ruby rvm. bash <<(curl -s https://rvm.beginrescueend.com/install/rvm) But I don't understand how it works. Could you explain this?