cURL / Mailing Lists / curl-users / Single Mail

curl-users

I cannot use curl for submit a form

From: Everton Zanella Alvarenga <everton137_at_gmail.com>
Date: Thu, 15 Jan 2009 02:50:04 -0200

Hi,

I'm trying to access this page

http://www1.folha.uol.com.br/fsp/opiniao/fz1401200904.htm

using curl and submit a login and a password to the page it is redirected:

https://acesso.uol.com.br/login.html?dest=CONTENT&url=http://www1.folha.uol.com.br/fsp/opiniao/fz1401200904.htm&COD_PRODUTO=7

I tried this curl command:

$ curl -b cookies.txt -d "user=LOGIN&pass=PASSWD" -L
http://www1.folha.uol.com.br/fsp/opiniao/fz1401200904.htm

I've also tried to pass the other form fields

$ curl -b cookies.txt -d
"skin=conteudo%2Ffolha&dest=CONTENT&url=http%3A%2F%2Fwww1.folha.uol.com.br%2Ffsp%2Fopiniao%2Ffz1401200904.htm&sc=040260CCB93326CD183972C4992326&user=USER&pass=PASSWD"
-L http://www1.folha.uol.com.br/fsp/opiniao/fz1401200904.htm

This is the form:

<form method="post" action="/login.html">
                                <input type="hidden" name="skin" value="conteudo/folha" />
                                <input type="hidden" name="dest" value="CONTENT" />
                                <input type="hidden" name="url"
value="http://www1.folha.uol.com.br/fsp/opiniao/fz1401200904.htm" />
                                <input type="hidden" name="sc" value="04026ADC9963264D1C3672C4992326" />

                                <fieldset id="assUol">
                                        <legend>Sou assinante UOL</legend>
                                        <label for="user">E-mail:</label>
                                        <input type="text" id="user" name="user" maxlength="80" value="" />
                                        <br />
                                        <label for="pass">Senha:</label>
                                        <input type="password" id="pass" name="pass" maxlength="20" />

                                        <input type="submit" class="submit" value="Entrar" />
                                </fieldset>
                                <h5><a href="https://sac.uol.com.br/info/esqueci-senha.jhtm">Clique
aqui</a> se você esqueceu sua senha</h5>
                        </form>

I read the manual and the man page, but I cannot find what is the problem.

The redirection option (-L) is working, since I'm getting the HTML
page for authentication. And it's downloading the page as if I typed
the wrong LOGIN or PASSWD.

Can someone, please, give me some help what else can I do?

Thanks in advance!

Tom

-- 
http://stoa.usp.br/tom
-------------------------------------------------------------------
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 2009-01-15