sddba has asked for the wisdom of the Perl Monks concerning the following question:

Hi guys, I would like to write a perl script that would go to a web page, enter login credentials (password in clear is ok, i can use a minimal access account) look for some text to ensure I got there and then logout. I need to be able to time this result and send the amount of time to a file. I did a few years ago and it was pretty easy to find the code. I had to put a few pieces together, but perl was the easiest way to do it. This would be a very handy script to have. I am a DBA (don't run away!) and this is for monitoring availability of an ERP system (Oracle-PeopleSoft). Please help I have searched and searched and i seem to be getting nowhere. I have downloaded and installed strawbery perl.
  • Comment on Need to monitor a website that has a login

Replies are listed 'Best First'.
Re: Need to monitor a website that has a login
by jethro (Monsignor) on Jun 17, 2009 at 23:55 UTC
Re: Need to monitor a website that has a login
by imrags (Monk) on Jun 18, 2009 at 06:14 UTC
    Having posted a few comments on the same in perlmonks,
    i'd advice to use Super Search.
    However, there are many modules which you can use for the purpose
    use Win32::IE::Mechanize; #other code, url, user, password etc. my $agent = Win32::IE::Mechanize->new(visible=>1); $agent->credentials($url,$user,$pass); $agent->get($url);
    That'd be one way of doing it
    You can also use WWW::Mechanize module, LWP also works, though i've not tried it
    Update::::
    the code was for basic authentication (htaccess) and not for filling the form on the website.
    If you want to fill in form to login, then you can also use Win32::IEAutomation.
    Raghu