Ah yes, hotmail is a pain.
There is a couple of redirects involved with the login process. And
some special vars you have to trace through their javascript to figure
out what to set. I'll post some code below to get around that.
They have one redirect that does a javascript Document.location....
change similar to AOL. You also have to find and repost all hidden
vars . If I recall correctly there is one redirect which has a form
and hidden vars on it that the javascript calls a post on the page load,
so you have to make sure to get those and do the post. Although it's
possible this has since changed.
Here is the code.
They set a hidden var called pwdPad to the following:
"IfYouAreReadingThisYouHaveTooMuchFreeTime" Then trim off an equal
number of characters from the end of it equal to the number of
characters in the password for the account.
if password is a string containing the password you are logging in with,
this code will set the pwdPad for you:
String sPad = "IfYouAreReadingThisYouHaveTooMuchFreeTime";
int lPad = sPad.length() - password.length();
if (lPad < 0) {
lPad = 0;
}
String pwdPad = sPad.substring(0, lPad);
That should get you started.
Jeff
[EMAIL PROTECTED] wrote:
Thanks,
I got this working today, the issue i was having was not grabbing some
hiddne fields in one of the pages.
Now, I need to do the same for hotmail, if you happen to have any tips
for that I'm all ears!
Thanks again!
Frank
----- Original Message ----- From: "Kyryll A Mirnenko aka Mirya"
<[EMAIL PROTECTED]>
To: <[email protected]>
Cc: <[EMAIL PROTECTED]>
Sent: Wednesday, April 04, 2007 9:02 AM
Subject: Re: HttpClient and AOL
On Wednesday 04 April 2007 15:50, [EMAIL PROTECTED] wrote:
I would REALLY appreciate if you could look at the specifics. I can
see
the Cookies going back and forth just fine but something isn't working.
What I captured was 4 http requests going back and forth doing some
type of
handshaking, however on the 4th one I get back a page saying "Your
browser
must support cookies and javascript" instead of the page that I see
when
actually using the javascript and I can't see why.
AOL uses extensive javascript, so you need to parse some pages to
extract
actual links and follow them. E.g. something like that:
<script>location="http://fuzzy.computed.by/aol/location"</script>
, simple following redirects with HttpClient won't do it for you.
Another
problem is cookies support, try switching on the browser
compartibility mode
and additionally setting this:
client.getParams().setParameter("http.protocol.single-cookie-header",
true);
to put all the cookies in a single header.
--
Regards, Mirya
ICQ #313898202
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]