curl-users
Re: I have problem using commandline curl
Date: Thu, 6 May 2004 08:59:11 +0200 (CEST)
On Wed, 5 May 2004, shree shree wrote:
> I get the message that the site can only be opened in internet explorer 5.0
> and above I have tried with -A mozilla compatiable with msie 6.0 also i
> couldnot get the page
>
> Please help me to get that page
Servers (can) use all sorts of tricks to attempt to detect your "browser". The
user-agent string is one, but they could also easily check other headers and
see that they look like IE.
Reading this might be a good start:
http://curl.haxx.se/docs/httpscripting.html
You could easily just evesdrop on the request IE sends and make sure you send
a very similar one.
> Actually i try to use curl command through perl script before I tried with
> commandline. I couldnot get the page. But java people accomplished the same
> task with some otherway.
Then do a similar request that the "java people" did.
> I tried to post the data through script using curl for the webpage which
> has method = post and input type = image so i hotcoded the name.x=value and
> name.y=value while running the script i am getting the page only if i run
> the script twice. For the same site if i pass the cookie to the next page
> then it comes everytime the the script runs.
That sounds as if you should enable cookies (-c or -b) in the post to make it
work more like a browser does.
> I couldnot get the through even commandline curl it has onchange select.
You mean javascript? Simple javascript shouldn't matter, the requests are
still plain HTTP and they can be done with curl.
> The previous pages also i can get only if i give -D 'cookie' and -b 'cookie'
> options
Try using -c instead of -D, it is more reliable.
-- Daniel Stenberg -- http://curl.haxx.se -- http://daniel.haxx.se Dedicated custom curl help for hire: http://haxx.se/curl.htmlReceived on 2004-05-06