Hello :) i will write a Perl script for my Debian Server. This script target the login to this site: https://plex.tv/users/sign_in/ Here is my code:
#!/usr/bin/perl use CGI; use CGI qw(:standard); use CGI::Carp qw(warningsToBrowser fatalsToBrowser); use Crypt::SSLeay; use WWW::Mechanize; my $mech = WWW::Mechanize->new(); my $url = "https://plex.tv/users/sign_in"; $mech->agent('User-Agent=Mozilla/5.0 (Macintosh; U; Intel Mac OS X + 10.5; en-US; rv:1.9.1.5) Gecko/20091102 Firefox/3.5.7'); $mech->get($url); print $mech->status; $result = $mech->submit_form( form_id => new_user, #name of the form #instead of form name you can specify #form_number => 1 fields => { user_login => 'test', # name of the input field and value user_password => 'test', } ,button => 'commit' #name of the submit button ); my $app_content = $mech->content(); print "$app_content\n";
I think it not works, because the "print" is the standard content. I hope anywhere can help me. Sorry for my bad english, thank you very much.

In reply to Perl simple login script need pls help by Scrilla

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.