From: David Vallner Date: 2006-02-15T05:42:04+09:00 Subject: Re: post_form Dňa 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/index.html. So I used post_form method > for logging. > > res = Net::HTTP.post_form > URI.parse('http://webmail.razdva.cz/index.html'), > { "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