in reply to CGI Auto Login
"...and have it log into my webmail automatically..."
And then what? Do you want 'the thing that logged you in' to just disappear and allow you access WebMail via your browser. Probably not going to work. Do you want to scrape each screen and deliver the contents via some proxy? That would work, but it seems uneccesary. I would definitely use WWW::Mechanize for that, but all of that work just so you can be lazy and not have to enter a password ... the payoff just isn't there for me. However, if you want to do this for your own education ... speed on! We will be glad to help you if you get stuck.Update: code review time :)
my $username = trim(param('username')); sub trim { my $dirty = shift; $dirty =~ s/^\s*//g; # remove leading whitespace $dirty =~ s/\s*$//g; # remove trailing whitespace return $dirty || ''; # return empty string if $dirty is undef }
looks much nicer, but now consider using CGI.pm:print q|<html> <head> <title>Logging in ...</title> </head> <body> |;
I also recommend using HTML::Template, but you might not be ready for that yet. (it comes with it's own learning curve)use CGI qw(:standard); print header, start_html('Logging in ...');
jeffa
L-LL-L--L-LL-L--L-LL-L-- -R--R-RR-R--R-RR-R--R-RR B--B--B--B--B--B--B--B-- H---H---H---H---H---H--- (the triplet paradiddle with high-hat)
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: (jeffa) Re: CGI Auto Login
by cdubbs94 (Initiate) on May 06, 2003 at 19:40 UTC | |
by jeffa (Bishop) on May 06, 2003 at 19:46 UTC | |
by cdubbs94 (Initiate) on May 06, 2003 at 20:00 UTC |