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

learn more… | top users | synonyms

0
votes
1answer
1k views

Proper escaping of double quotations for curl post data?

I'm trying to test out a server, by sending it JSON data and reading the response. I need to POST data like {"item":"value with spaces"} but when I use curl I find that it sends the backslashes as ...
0
votes
2answers
1k views

How to run a command with a hidden password

I need to run a curl command that accesses a website that another person has the password to. e.g. curl --basic --user myfriendsname:friendspassword http://www.updateinfo.com I need a way where I ...
1
vote
1answer
2k views

curl url call in for loop? [closed]

I am working with bash and I am trying to make a curl url call in a for loop. Below is my simple curl call - curl -v --header "Connection: keep-alive" ...
1
vote
0answers
99 views

phpcurl not able to install on terminal

I am not able to install packages php and curl. But its gives dependencies error, please check below curl : Depends: libcurl3 (= 7.29.0-1ubuntu3.4) but 7.32.0-1ubuntu1 is to be installed ...
4
votes
2answers
2k views

How to check whether a command such as curl completed without error?

I am using curl to upload a file to a server via an HTTP post. curl -X POST -d@myfile.txt server-URL When I manually execute this command on the command line, I get a response from the server like ...
0
votes
3answers
95 views

How to display the complete address with curl in searching?

I need to display the complete address with curl, when it find results with '301' status code. This is my variable. search=$(curl -s --head -w %{http_code} ...
3
votes
2answers
7k views

Using curl to access basic auth protected website via proxy (polipo)

I am trying to download a file protected via basic auth: curl "http://User:Pass@example.com/blub/bla.bin" This is working fine. As soon as I tell curl to use my locally installed polipo it fails: ...
4
votes
3answers
490 views

download only first few bytes of a source page

I am downloading the HTML source page of a website using cURL command. The problem is, I do not want most of the contents in the page. I just need the first 100 lines of the source page. Is there a ...
0
votes
1answer
20 views

curl does not return any thing for protected file

I have a file on the server that is HTTP Head password protected, but when I tried to get the page the command returned with nothing at all: curl --user username:password http://mysite.com
0
votes
1answer
1k views

Failed to connect to dl.google.com port 443: Network is unreachable

$ curl -v https://dl.google.com/dl/cloudsdk/release/install_google_cloud_sdk.bash | bash * STATE: INIT => CONNECT handle 0x2001f130; line 1011 (connection #-5000) * Hostname was NOT found in DNS ...
0
votes
0answers
50 views

curl unable to find cslistener

netstat shows some connection from my linux box to remote host on their cslistener port. But trying to access that port using curl is giving error : $ curl -v https://myapp.domain.com:cslistener * ...
1
vote
1answer
2k views

Why does curl command take urls with parameters as input

I know both wget and curl. Being curious I read a little about their differences. I recently tried to use curl with an url who has parameters and it turns out curl strips down the parameters from ...
2
votes
1answer
246 views

Understanding two flags and a dollar sign in a CURL command

I right clicked a post request in Chrome and selected Copy as cURL I got a cURL command that includes the following --data-binary $'------WebKitFormBound I am used to seeing cURL requests that ...
0
votes
1answer
198 views

Use curl to download from a Url

I am trying to download a file from a url using curl: $ curl -3 -v "https://atl1mmsget.msg.eng.t-mobile.com/mms/wapenc?location=XXXXXXXXXXX_14zbwk&rid=027" Where the X is a digit in the phone ...
0
votes
1answer
817 views

Slow DNS resolve from curl/lynx etc

I have a strange issue with DNS resolving: Root of the problem is that I get curl errors: "Error executing HTTP request: name lookup timed out". Tried to ping some sites, all resolved fine (and fast). ...
0
votes
1answer
769 views

Uniq won't remove duplicate

I was using the following command curl -silent http://api.openstreetmap.org/api/0.6/relation/2919627 http://api.openstreetmap.org/api/0.6/relation/2919628 | grep node | awk '{print $3}' | uniq ...
0
votes
2answers
3k views

curl command output in a variable [duplicate]

I am connecting to mySQL database using a shell script. After connecting to the mySQL database, I execute a query. The query gives me 300,000 URLs as the result. For each of the 300,000 URLs I need ...
0
votes
1answer
594 views

What does this curl command do?

I'm really new to Unix and I can't figure out what this command does. From what I understand, it sends an HTTP POST request to a website. I don't know exactly what each line is supposed to do. Can ...
-1
votes
1answer
496 views

How to print gmail inbox messages

I want to print inbox messages one by one (like cat someFile) so that I can parse the message contents. something like printGmail InboxMesg1 | grep some | sed some Using curl I can access the ...
0
votes
0answers
73 views

Drag and drop files with cURL

I know that curl supports file upload e.g. here. Is it possible to upload files to site which has HTML5 Drag and Drop box for file uploading
0
votes
2answers
319 views

download multiple files from sourceforge

Is there any way to download / mirror a folder structure with many files from sourceforge using wget/curl/similar tool? I've seen some examples using rsync or scp but I think that works only for SF ...
0
votes
3answers
193 views

transfer file to remote host and append to file if existing

I have a command-line program that continuously generates output on the shell. I would like to be able to transfer the output to another unix host for which I know IP, username and password. ...
0
votes
1answer
64 views

Curl command help

I'm trying to connect to a internal tool UI, then login and later logout. The homepage is having 3 drop-down options and 2 tabs where we need to enter the IP & Port and then connect. Once ...
1
vote
1answer
273 views

Download attachments in a URL redirect via Axel

Axel is not resolving URLs that redirect to another URL that has the file as an attachment. As you see, I'm getting 404 when I try to download this URL. (original site is replaced with example.com) ...
0
votes
2answers
1k 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
3k 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
285 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
354 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
1k 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 ...
15
votes
3answers
22k 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 ...
2
votes
1answer
893 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
275 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
1k 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
2k 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
789 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. ...
10
votes
2answers
13k 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 ...
3
votes
1answer
366 views

Given a mime-type get the corresponding file extension

I want to download a 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
6k 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
549 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
224 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
355 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
330 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
535 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
638 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 ...
1
vote
2answers
2k 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
5k 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
116 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
57 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
579 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 ...