cURL / Mailing Lists / curl-users / Single Mail

curl-users

newbie question: URL encoding

From: mud honey <mudhoney1990_at_gmail.com>
Date: Wed, 9 Jul 2008 17:07:28 +1000

Hello,

I am trying to use cURL to grab a HTML page from a SSL secured server. The
required sequence of events to get the information I need is:

1. send login details to secured form
2. receive cookie
3. request index page sending cookie
4. receive index page
5. select URL from index page for the required info

I can do everything up to step 5 ok. The links on the index page are of the
form http://somesite.com/blah/openfile.asp?crypt=%escape%sequenced%stuff

Works fine in browser, can't get it to in cURL. I am using

curl -b cookie "url_with_url%encoded%chars"

I get back a bunch of binary crap that wrecks my linux terminal. It is
definitely not the right stuff which is plain old HTML. Is it the correct
thing to send the escape chars just like %9F%A7 for example, or do I need to
tell curl to handle it some special way? I have the url enclosed in double
quotes.

Thanks,

Mudhoney

-------------------------------------------------------------------
List admin: http://cool.haxx.se/cgi-bin/mailman/listinfo/curl-users
FAQ: http://curl.haxx.se/docs/faq.html
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2008-07-09