Perl

  1. Home
  2. Computing & Technology
  3. Perl

Perl Module WWW::Myspace

How to hack and automate MySpace with the WWW::Myspace Perl module.

From About.com

MySpace is all the rage, and with it comes the usual volley of tricks and hacks. Take control of your MySpace account without ever having to log in by using the WWW::Myspace perl module to automate things. Once you give it a username and password, you can use WWW:Myspace to login, check and reply to messages, add friends and practically anything you can do by hand.

First, like all non-standard Perl modules, you will need to install WWW::Myspace from CPAN, and then you can include it at the top of your Perl programs with the use statement:

use WWW::Myspace;
After that, creating a MySpace object is as simple as logging in:
my $myspace = WWW::Myspace->new($account, $password);
Let's say you want to get a list of all your friends, or the HTML profile of one of your friends.
@friends = $myspace->get_friends;
foreach (@friends) {
  $friend = $myspace->get_profile($_);
  print $friend->content;
}
You can even automatically post messages to your friends profiles.
$result = $myspace->post_comment(FRIEND_ID, 'Howdy, folks!');
Download it and give it a try. No good Perl hacker should have to do things that could easily be automated! Module Links:
  1. WWW::Myspace on CPAN
  2. WWW::Myspace Documentation
  3. Grant Grueninger
More Perl Quick Tips

Explore Perl

About.com Special Features

Perl

  1. Home
  2. Computing & Technology
  3. Perl
  4. Programming Perl
  5. Packages & Modules
  6. Perl Module WWW::Myspace - How to hack and automate MySpace with the WWW::Myspace Perl module.

©2009 About.com, a part of The New York Times Company.

All rights reserved.