cURL / Mailing Lists / curl-users / Single Mail

curl-users

Re: Query string not working using cURL

From: bruce <badouglas_at_gmail.com>
Date: Thu, 29 Apr 2010 06:41:57 -0700

Hey Scott...

this might be basic, so bear with it!!

you can fetch the majoirty of web page data by doing a get/post
request. the get is normally simply the url+querystring as one string
that you feed to curl.

the post breaks the url, data up into two different parts. if you do a
quick search of the net for "curl" "post" "request" for
sample/tutorials.. there should be plenty of examples on this..

good luck!

On Wed, Apr 28, 2010 at 5:58 PM, ubuntu serv.user
<ubuntu.serv.user_at_gmail.com> wrote:
> I've read the cURL tutorial (http://curl.haxx.se/docs/httpscripting.html)
>
> When I navigate to the following in a browser:
>
> http://www.kayak.com/s/search/air?do=y&ft=rt&ns=y&cb=e&pa=1&l1=MSP&t1=e&df=us1&d1=05/20/2010&l2=PHX&t2=e&d2=05/23/2010&b=US
>
> I get the results back that I expect.
>
> When I type the below in the terminal window from my computer running Ubuntu
> Desktop 9.10:
>
> curl -d
> "do=y&ft=rt&ns=y&cb=e&pa=1&l1=MSP&t1=e&df=us1&d1=05/20/2010&l2=PHX&t2=e&d2=05/23/2010&b=US"
> http://www.kayak.com/s/search/air
>
> I get the following back (garbage):
>
>
>
> The above cURL command line format that I tried above is thoroughly
> explained in section 4.2 Post of the CURL tutorial.
>
> I strongly suspect that I am doing something wrong, but I couldn't find it
> in the tutorial or by Googling it.
>
> As a note - curl from the command line works just fine when using yahoo.com
> for example.
>
> Is there anyone experienced in this matter?
>
> Any help would be greatly appreciated.
>
> Thanks,
> Scott
>
>
> -------------------------------------------------------------------
> List admin: http://cool.haxx.se/list/listinfo/curl-users
> FAQ:        http://curl.haxx.se/docs/faq.html
> Etiquette:  http://curl.haxx.se/mail/etiquette.html
>
>
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-users
FAQ: http://curl.haxx.se/docs/faq.html
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2010-04-29