KethiLastFm is a PHP class designed to allow you easy access to Last.fm's user profile API for use on your website. Just download my PHP class, include it into your existing website, supply your username, and call the draw_latest_ten_tracks() method. Apply any optional CSS to the markup that you'd like, then you're done!
Download
Example code
<?php
require_once('inc/kethilastfm.inc.php'); // include kethilastfm
$kethilastfm = new kethilastfm('kethinov'); // instantiate it with your last.fm username
$kethilastfm->draw_latest_ten_tracks(); // show last ten tracks you listened to
?>
Sample CSS (optional)
.kethilastfm li strong {font-weight:normal;}
.kethilastfm li em {float:right;font-style:normal;color:#909090;}
.kethilastfm li span {display:none;}
Live demo: the last ten tracks I've listened to
- 1 day, 10 hours ago: Gario – Zeal Feels Good
- 2 days, 15 hours ago: Calexico – Still Missing
- 2 days, 15 hours ago: Moby – My Love Will Never Die
- 2 days, 15 hours ago: John Williams – Grievous Speaks to Lord Sidious
- 2 days, 15 hours ago: Soundgarden – Dusty
- 2 days, 15 hours ago: 東京シティ・フィルハーモニック管弦楽団 – Soft-Boiled Hero - Divertissement, the Fourth Movement
- 2 days, 15 hours ago: Joel Goldsmith – Murderer Of Untold Millions
- 2 days, 15 hours ago: Arcade Fire – I'm Sleeping in a Submarine
- 2 days, 15 hours ago: Trent Reznor and Atticus Ross – People Lie All the Time
- 2 days, 15 hours ago: Daft Punk – The Son Of Flynn
powered by KethiLastFm by Eric Newport
Licensing
KethiLastFm is licensed under the Creative Commons Attribution 3.0 United States License. You are permitted to redistribute and/or modify this work for commercial or noncommercial purposes provided proper attribution to the original author (me) is present in the redistribution.
