tags:

views:

438

answers:

3

I am writing a Perl script to access intranet page with authentication. Is there any Perl module to access intranet web page?

+5  A: 

Take a look at LWP and Authentication with LWP.

Brian Rasmussen
Dear down voter, please leave a comment, so I have a chance of fixing any mistakes I may have made.
Brian Rasmussen
+5  A: 

There is no difference between an intranet and the Internet as far as software is concerned - they use the same technology, one is just private.

How you deal with the authentication depends on how the authentication is implemented. WWW:Mechanize will probably walk through most things, but I have a nagging memory of some proprietry Microsoft system that lets Internet Explorer use the user's domain authentication details, if you are using that then you might find Win32::IE::Mechanize will handle that for you.

David Dorward
+8  A: 

Generally THE way to deal with it is to use WWW::Mechanize. For starters, install WWW::Mechanize::Shell, and run:

perl -e 'use WWW::Mechanize::Shell; shell'

then you can use "help", "get", "open", "fillout" and other cool commands.

When you'll finish basic work (like going to page, logging in, some navigation on the pages) type command "script" - which will generate working perl program that will repeat the same steps you just did interactively. You can copy/paste this program to some .pl file, and modify it to suit your needs.

depesz
Excellent module I use it for intranet data pulling and subsidence parsing all the time. Good answer.
Copas