> Greetings,
> 
> I used CPAN (libwww-perl) docs as my main reference
> and generated the following script (trying 'content'
> as well as 'authorization_basic' for user id & pw),
> but keep getting "405 Method Not Allowed".
> 

'Method not allowed' is usually provided when you try a POST and need a
GET or vice versa, however, in this case I believe you are getting that
because you are not POST'ing to the login url, but to the home page
instead. See below...

> I would very much appreciate any suggestions.
> 
> Cheers,
> David
> 
> #!perl -w
> use LWP::UserAgent;
> use HTTP::Cookies;
> 
> $ua = LWP::UserAgent->new;
> $ua->cookie_jar(HTTP::Cookies->new(file =>
> "lwpcookies.txt", autosave => 1));
> 
> # Create a request
> my $req = HTTP::Request->new(POST =>
> 'http://www.gene-regulation.com/');

The above needs a 'login' tacked onto the end so you are submitting your
content to the actual login script not to the homepage.

> $req->content_type('application/x-www-form-urlencoded');
> 
> # Login
> # $req->content('user=gratner&password=motley');

The above should be what you need.

Does that get it?

http://danconia.org

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to