cURL / Mailing Lists / curl-users / Single Mail

curl-users

Re: Retrieving page after logging in

From: Dan Fandrich <dan_at_coneharvesters.com>
Date: Wed, 7 May 2008 12:22:29 -0700

On Wed, May 07, 2008 at 07:51:01PM +0100, tester_at_spowod.org.uk wrote:
> Thanks, but that didn't seem to work.
>
> How am I supposed to provide userid and password fields via cURL to a URL like this
>
> http://abc/login?

That's entirely dependent on the site. If the site uses HTTP authentication,
then use curl's -u option and one of the authentication options like
--any-auth. If not, then it probably involves submitting something to a
form, just as you've done in your original message. Read
http://curlm.haxx.se/docs/httpscripting.html for some hints.

> And how do I tell if the login was successful?

In the HTTP authentication case you'll receive a 200 or similar error code.
In the other case, you'll probably receive an HTML page saying something
like "Welcome to abc site, tester!"

>>> Dan

-- 
http://www.MoveAnnouncer.com              The web change of address service
          Let webmasters know that your web site has moved
Received on 2008-05-07