cURL
Haxx ad
libcurl

curl's project page on SourceForge.net

Sponsors:
Haxx

cURL > Mailing List > Monthly Index > Single Mail

curl-users Mailing List Archives

Re: Question About CURL and Sessions.

From: Ralph Mitchell <rmitchell_at_eds.com>
Date: Tue, 14 Oct 2003 10:47:16 -0500

If that first page, the login page, is actually a fill-in form displayed
by the browser, you're going to have to save the html, extract the form
entry elements and post them back to the server.

The "-u user:pass" feature in curl only handles the pop-up
authentication boxes, which have a well-defined interface that's not
under (much) user control. Any random logon page written by a web
developer could use any random variable names for the userid and
password, which makes it essentially impossible for curl to fill in that
kind of form. The variable names don't even have to be English words...

Ralph Mitchell

MARTINEZ OGALDE RICARDO JAVIER wrote:

>Hi.
> I'm new in the use of curl program. I'm trying to send comands to
>a Server. This server has a Web Interface, and the first page is a logon
>page. For example i want to modify the parameter retry. So i apply the
>next line:
>
>curl -d save=save -d retry=400 -u user:pass
>myproxy.com/reg_admin_en.htm?session=dkj287iu22872iou34
>
>This only works if I have just created a session before.
>
>If i use
>
>curl -d save=save -d retry=400 -u user:pass
>myproxy.com/reg_admin_en.htm
>
>I obtain the next line :
>
><HTML><HEAD>
><TITLE>snom proxy: Redirect</TITLE>
></HEAD><BODY>
>If you don't get redirected automatically, please click<a
>href="login_en.htm?goto=reg_admin_en.htm">here</a>
></BODY></HTML>
>
>so i send again :
>
>curl -d save=save -d retry=400 -u user:pass
>myproxy.com/login_en.htm?goto=reg_admin_en.htm
>
>And i obtain the logging page... but don't make any changes.....
>
>So the command only work if i send a session parameter (that i don't know
>before i start a session), and if the command is not send i obtai a
>redirect page....
>
>I really don't know if this is a problem with the curl or is a problem
>with my Server..but maybe someone has a similar problem....
>
>Any ideas?!?!?
>
>Thanks in advance..
>
>
> "...for long you live and high you fly
> And Smiles you'll give and tears you'll cry
> And all you touch and all you see
> Is all your life will ever be..."
>
> Ricardo Javier Martinez Ogalde
> Ingenieria Civil Electrica
> Universidad de Chile
>
>
>-------------------------------------------------------
>This SF.net email is sponsored by: SF.net Giveback Program.
>SourceForge.net hosts over 70,000 Open Source Projects.
>See the people who have HELPED US provide better services:
>Click here: http://sourceforge.net/supporters.php
>
>

-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
SourceForge.net hosts over 70,000 Open Source Projects.
See the people who have HELPED US provide better services:
Click here: http://sourceforge.net/supporters.php
Received on 2003-10-14

These mail archives are generated by hypermail.

donate! Page updated November 12, 2010.
web site info

File upload with ASP.NET