Asp Forum
Home
|
Login
|
Register
|
Search
Forums
>
comp.lang.ruby
post_form
(Fox)
2/14/2006 12:30:00 PM
Hi,
I'm trying to do auto login and mail checker script to check my webmail
account
http://webmail.razdva.cz/...
. So I used post_form method
for logging.
res = Net::HTTP.post_form
URI.parse('
http://webmail.razdva.cz/...
'),
{ "mode" => "login", "username"=>"user",
"password"=>"pwd", "secure" => "0" }
This call succeeds and res is HTTPFound, so I tried to download
redirected page, but the server immediatelly logouts me. I think that
problem is in cookies, becuase they are required by the server.
Should I start some session prior to posting a form?
Thanks a lot,
Fox
1 Answer
David Vallner
2/14/2006 8:42:00 PM
0
Dna Utorok 14 Február 2006 13:33 Fox napísal:
> Hi,
>
> I'm trying to do auto login and mail checker script to check my webmail
> account
http://webmail.razdva.cz/...
. So I used post_form method
> for logging.
>
> res = Net::HTTP.post_form
> URI.parse('
http://webmail.razdva.cz/...
'),
> { "mode" => "login", "username"=>"user",
> "password"=>"pwd", "secure" => "0" }
>
> This call succeeds and res is HTTPFound, so I tried to download
> redirected page, but the server immediatelly logouts me. I think that
> problem is in cookies, becuase they are required by the server.
> Should I start some session prior to posting a form?
>
> Thanks a lot,
> Fox
Sessions are mostly stored server-side, so you need to re-send the cookies the
server gives you back with each subsequent request.
Personally, I'd just use a Real Mail Account that lets you use POP.
David Vallner
Servizio di avviso nuovi messaggi
Ricevi direttamente nella tua mail i nuovi messaggi per
post_form
Inserendo la tua e-mail nella casella sotto, riceverai un avviso tramite posta elettronica ogni volta che il motore di ricerca troverà un nuovo messaggio per te
Il servizio è completamente GRATUITO!
x
Login to ForumsZone
Login with Google
Login with E-Mail & Password