Perl en Español

  1. Home
  2. Tutoriales
  3. Foro
  4. Artículos
  5. Donativos
  6. Publicidad
 

Help, WWW::Mechanize is not working!

 
Publicar nuevo tema   Responder al tema    Foros de discusión -> Módulos
Mensaje Dom Ago 19, 2007 11:10 pm
MarkRolsen
Perlero Nuevo
Perlero Nuevo
Registrado: 19 Ago 2007
Mensajes: 1
Help, WWW::Mechanize is not working! Responder citando

Hello!
I want to login into my favorite forum automatically and I have a code (the login and password are existed):
Perl:

#!/usr/bin/perl

use WWW::Mechanize;
$mech = WWW::Mechanize->new();
$mech->get('http://www.alessonislearned.com/phpBB/login.php');

my $res = $mech->submit_form(
    with_fields => {
                    username => 'markrolsen',
                    password => '08082006',
                    autologin=> 'on',
                    },
    button      => 'login',
);
my $output_page = $mech->content();
print "Content-Type: text/html\n\n";
print "$output_page";

But it doesn’t work. Let me know where is a mistake? I get

You have specified an incorrect or inactive username, or an invalid password

Sorry but I don’t speak Spanish.
Mensaje Lun Ago 20, 2007 3:32 am
explorer
Moderador
Moderador
Registrado: 24 Jul 2005
Mensajes: 4092
Ubicación: Valladolid, España
Responder citando

Welcome to Perl en Español's forum.

I tried it, and it worked perfectly.

Please, edit your message and change your password!!!
Publicar nuevo tema   Responder al tema    Foros de discusión -> Módulos Todas las horas son GMT - 6 Horas
Página 1 de 1



Powered by phpBB © 2001, 2005 phpBB Group