CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
Search Posts SEARCH
Who's Online WHO'S
Log in LOG

Home: Perl Programming Help: Intermediate:
POST-Problems while getting yahoo-mail



Jun 16, 2000, 11:56 PM

Post #1 of 3 (1534 views)
POST-Problems while getting yahoo-mail Can't Post

I try to get my emails (that are sent to my yahoo-account) with a perlscript on my harddisk.

I've taken the randomly generated Login-HTML-File and post the form with login and passwd and all the hidden fields(with HTTP::Request and LWP::UserAgent).

But the response is not the site with my mails, but a site with a redirection to the former login-HMTL-file (but now I have only to give my passwd).

Do I have to pass more information than the fields in the form?
How does yahoo know, that my user agent is not real browser?

Many thanks for answering :-)

PS: Does anybody know this HTML-tag <form method=post action="blabla" autocomplete=off name=a>?
I don't understand autocomplete and name? Does it change the browsers request?


Jun 17, 2000, 8:23 AM

Post #2 of 3 (1535 views)
Re: POST-Problems while getting yahoo-mail [In reply to] Can't Post

I don't think that yahoo would know the difference between the user agent and your browser. I think that your getting a login page because a value is being lost...? Could be that the hidden values are generated and they changed the next time you went to login then the mail system didn't accept the values. Just a guess.

About the form. Autocomplete is an Ie5 feature. If you have Ie5 you can go to tools,Internet Options,Content (Tab), And look for the button that says auto complete. If you turn it on for forms everytime that you use a form it saves the value and if you type in one letter in the form it will bring up all of the previous entries that start with that letter. You can turn it on or off but the form values will still cache so it's a good idea to clear out the cash in the internet options,content,auto complete section about once a month.

I'm not to sure about the name, but I think it's used to define what is in the form. I think that if the form has a name you can do something in the url to put a value in the form field. Like so,

If Seeki's search form was named search it would probably stick the value (acura) in it.

Hope this helps Smile



Jun 18, 2000, 11:59 PM

Post #3 of 3 (1534 views)
Re: POST-Problems while getting yahoo-mail [In reply to] Can't Post

<form method=post action="blabla" autocomplete=off name=a>

Well, post refers to the method that the data will be sent. Without knowing your script, I can't say if your sending the data the same way, but you probably are. It's also possible that they wouldn't care either way.

However, the name attribute has me a bit puzzled. I've never used it in a form tag. It may be sending data, just like naming a submit button will. You might want to make a copy of their generated page, change the action to a script of yours, and have the script print out the contents of the various places data get's stuck.

Something like the following might be useful to read whatever data is sent to it and spit it out:

foreach ($arg_data)
{ print "$_: $arg_data{$_}"; }

sub read_arg_data
my ($name,$value);

if ($ENV{'CONTENT_TYPE'} eq 'application/x-www-form-urlencoded')
if ($ENV{'CONTENT_LENGTH'}>131072) { die "DZForum: POST content length overflow: $ENV{'CONTENT_LENGTH'} bytes!\n"; }

foreach ( split(/&/,$ENV{'QUERY_STRING'}) )
($name,$value) = split(/=/);

$name =~ s/\+/ /g;
$value =~ s/\+/ /g;

$name =~ s/\%([0-9A-Fa-f]{2})/chr(hex($1))/ge;
$value =~ s/\%([0-9A-Fa-f]{2})/chr(hex($1))/ge;

$arg_data{$name} = $value;


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives