Posted by
Leon in
PHP, Web, spotify
Mar 1st, 2009 |
No Comments
A month or so ago I hacked the last.fm for wordpress plugin to allow for integration with Spotify. The basic idea was that the plugin would pull in your recently played tracks and then allow users to open those tracks directly within Spotify by clicking on a green note.
A had a spare two hours this morning so decided to see what I could make in that time.
This new mash-up is a little different. You give it your Last.fm username and it will go and find your top artists. It then uses this to find the top tags for each of those artists. It then orders the tags by the amount of times they occur across...
Posted by
Leon in
PHP
Oct 28th, 2008 |
No Comments
A common issue with modern browsers is the fact that they have the ability to open many file types by default. This isn’t usually a problem, unless you want to make sure that a file is downloaded to a user’s desktop. You could zip the file, which usually forces a download, but what about times when zipping something is just an unecessary step (such as a vCard).
A simple trick is to use the script below to force the browser to download the file.
if ($_REQUEST["filename"] != “”) {
$filename = str_replace(“../”, “”, $_REQUEST["filename"]);
if ($filename...
Posted by
Leon in
PHP
Jun 5th, 2008 |
No Comments
As you may have guessed from the title, this post is about two things; PHP and twitter. I’ll assume you all know what PHP is, but for people that don’t know about Twitter it is a service for friends, family, and co–workers to communicate and stay connected through the exchange of quick, frequent answers to one simple question: What are you doing?
When I first signed up many months ago, I must admit: I didn’t really get it. I couldn’t see the point in telling people what I was up to online, when I could simply tell them face to face. It seemed far too much effor to...