The page you are looking at now is at this URL: http://pastoid.com/a3k
This paste was last updated on July 2, 2009 at 1:05 am.
class Phergie_Plugin_LibreFM extends Phergie_Plugin_Abstract_Command { /** * @return void */ public function onDoLibreFM($user = null) { $source = $this->event->getSource(); $user = $user ? $user : $this->event->getNick(); $data = json_decode(file_get_contents("http://alpha.libre.fm/rdf.php?fmt=json&page=/user/$user/recent-tracks")); $d = $data->{"_:seq1"}->{"http://www.w3.org/1999/02/22-rdf-syntax-ns#_1"}[0]->value; $data = $data->$d; if ( $data ) { $song = $data->{"http://purl.org/rss/1.0/title"}[0]->value; $date = date('r', strtotime($data->{"http://purl.org/dc/terms/date"}[0]->value)); $msg = sprintf("%s, %s was listening to %s", $date, $user, $song); $this->doPrivmsg($source, $msg); } else { $this->doPrivmsg($source, sprintf("Can't find status for %s on Libre.FM", $user)); } } }
| Referring Domain | Hits |
|---|---|
| Unknown Referer | 67 |
| pastoid.com | 3 |
Tip: Use Pastoid to shorten URLs with this bookmarklet: Pastoid This