curl / Mailing Lists / curl-users / Single Mail

curl-users

Re: redirect URL

From: Claudio Piga <claudio.piga_at_gmail.com>
Date: Tue, 21 Mar 2017 13:47:57 +0000

Dear Curl users
I am totally new to curl and its use, but I hope this query makes sense to
you. Apologies if it is a rather mundane type of problem.

I have to save queries for my research. I have to deal with urls of this
kind:

http://www.booking.com/searchresults.html?src=index&nflt=&lang=en-gb&checkin_monthday=14&checkin_year_month=2017-6&checkout_monthday=15&checkout_year_month=2017-6&interval_of_time=any&flex_checkin_year_month=any&&group_adults=2&group_children=0&dest_type=city&dest_id=-1454990&selected_currency=GBP&radius=2

For brevity's sake, define this as <url>

Using the DOS Command Prompt, from the directory where the curl.exe is
stored, I issued the following command:

*curl -o example.html <url>*
I think curl does not seem to like all the &, so I also tried the version:

*curl -o example.html "<url>"*

 that is, I put the whole url in quotes.
Note that the url (without quotes) works in a brower and downloads the
relevant page. Unfortunately, the file created by curl is empty.
Could you please refer me to the correct syntax for the curl command?
Many Thanks
Claudio

--

-----------------------------------------------------------
Unsubscribe: https://cool.haxx.se/list/listinfo/curl-users
Etiquette: https://curl.haxx.se/mail/etiquette.html
Received on 2017-03-21