Skip to content

Instantly share code, notes, and snippets.

What would you like to do? "now playing" script for Textual. Installation: Replace 'apfeltalkdewey' with your username. Copy this script to ~/Library/Application Scripts/com.codeux.irc.textual/lastfm.php Usage: /lastfm
$doc = new DOMDocument();
$arrFeeds = array();
foreach ($doc->getElementsByTagName('track') as $node) {
$itemRSS = array (
'artist' => $node->getElementsByTagName('artist')->item(0)->nodeValue,
'name' => $node->getElementsByTagName('name')->item(0)->nodeValue
array_push($arrFeeds, $itemRSS);
echo ("/me is listening to ".$arrFeeds[0]['name']." by ".$arrFeeds[0]['artist'].".");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.