Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: 183423da98
Fetching contributors…

Cannot retrieve contributors at this time

27 lines (20 sloc) 0.575 kb
This library uses the Last.fm API to fetch various music data. In addition, it utilizes the Spotify Metadata API to add a spotify link to the songs.
Requirements:
- PHP 5.2
- A Last.fm API key
- Cron jobs
Installation:
Put your api key in cronjob.php
Setup a cron job that will run cronjob.php every 5 minutes or so
Usage:
<pre>
<?php
// Be sure to set the right include path
require 'LastFM.php';
require 'Spotify.php';
$lastFm = new LastFM('my_api_key');
$tracks = $lastFm->userGetTracks('Hanse');
foreach ($tracks as $track) {
print_r($track);
}
</pre>
Jump to Line
Something went wrong with that request. Please try again.