This is actually quite simple. Unlike keeping the users available for chatting, all you need to do is get them signed in. Therefor you don't need to store the cookies like you normally would enabling you to do multi-logins.
use WWW::Mechanize; my $mech = WWW::Mechanize->new(); my $url = "url.here"; $mech->get( $url ); $mech->submit_form( form_number => 2, fields => { username => 'name', passwrd => 'pass', } ); my $mech2 = WWW::Mechanize->new(); $mech2->get( $url ); $mech2->submit_form( form_number => 2, fields => { username => 'name', passwrd => 'pass', } ); my $mech3 = WWW::Mechanize->new(); $mech3->get( $url ); $mech3->submit_form( form_number => 2, fields => { username => 'name', passwrd => 'pass', } ); print "done";
The above code is tested but there are other things to think about, too. You might want to randomly pull a few usernames each time so different users are signed in after each login session. It'll make it look more realistic to people who are looking at account profiles seeing the last access/login time for each user.

You could also add a flatfile database and use a logout script to randomly pull a name or two of your signed in users every X minutes, too.

This is the basics, but think about making it perform a little more realistic.



"Age is nothing more than an inaccurate number bestowed upon us at birth as just another means for others to judge and classify us"

sulfericacid

In reply to Re: creating script that logs in to site under different names by sulfericacid
in thread creating script that logs in to site under different names by Anonymous Monk

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.