The page you are looking at now is at this URL: http://pastoid.com/a4x
This paste was last updated on July 10, 2009 at 11:41 pm.
<?php /** */ class Phergie_Plugin_LastFM extends Phergie_Plugin_Abstract_Command { /** * @return void */ public function onDoLastFM($user = null) { $source = $this->event->getSource(); $user = $user ? $user : $this->event->getNick(); $lines = file_get_contents("http://ws.audioscrobbler.com/2.0/user/{$user}/recenttracks.xml"); if ( $lines ) { $xml = new SimpleXMLElement($lines); $track = $xml->track[0]; $song = $track->name . ' by ' . $track->artist; $user = $xml['user']; $date = $track->date; if (isset($track['nowplaying'])) { $msg = sprintf("%s is listening to %s", $user, $song); } else { $msg = sprintf("%s, %s was listening to %s", $date, $user, $song); } if ($track->streamable == 1) { $msg .= ' - ' . $track->url; } $this->doPrivmsg($source, $msg); } else { $this->doPrivmsg($source, sprintf("Can't find status for %s on Last.FM", $user)); } } }
| Referring Domain | Hits |
|---|---|
| Unknown Referer | 127 |
| pastoid.com | 4 |
Tip: Use Pastoid to shorten URLs with this bookmarklet: Pastoid This