Archive for the ‘PHP’ Category

Last.fm recent tracks Wordpress plugin

Tuesday, November 1st, 2005

13409
I hacked together a simple Wordpress plugin for Last.fm which uses the webservice feed to display the recently played tracks on your weblog. It’s based on the del.icio.us Wordpress plugin and uses a similar layout, the same caching mechanism (to a file in /tmp) and CURL to retrieve the feed.

You can download the plugin here: lastfm.zip

To install simply unzip and copy the lastfm.php file to your /wp-content/plugins/ directory. Turn it on in your administration panel. And finally call the recent_tracks(<username>) function with your username from somewhere in your template. i.e:


<li><h2><a href="http://www.last.fm/user/tizzle/">last.fm/user/tizzle</a></h2>
<ul>
<?php recent_tracks('tizzle'); ?>
</ul>
</li>

Make sure your webhost has installed the CURL library for PHP though otherwise this plugin won’t work.
If not you could opt to use this modified version of my plugin which uses fopen instead.

Version history:

  • 0.5 (16-05-2007) - small fix to account for changes in Lastfm XML format (Thanks Anthony!)
  • 0.4 (09-03-2006) - changed caching behaviour and using XML instead of RSS feed
  • 0.3 (01-11-2005) - moved UL tag generation into plugin
  • 0.2 (01-11-2005) - fixed a caching problem
  • 0.1 (01-11-2005) - initial release

Aaargh

Thursday, August 18th, 2005

Ever since Audioscrobbler became Last.fm i am pulling my hair out at all the idiotic UI design issues the new site has. To add a friend you have to find the + sign way over at the right on the menu bar on a user’s profile. They won’t say what the plus does, -after- you manage to find it, mind you you’ll just have to go for it. Now for adding yourself to a group the secret + sign is appearently not good enough, here they have opted for a miniscule text link in between the items on the -left- of your screen. At least this one says what it does. After you find it…

Last.fm is one of those really cool ideas that never really got implemented very well. Aside from the UI issues there is so much more that can be done with the wealth of data (and users) the site has. Still… go install the plugin and start scrobbling. It’s pretty cool nonetheless and Joi Ito is advising them appearently so it’s bound to become better somewhere down the line :)

SpotlightSiteSearch

Tuesday, August 16th, 2005

Spotlight
Command-Tab has implemented a nice spotlight styled auto complete search field on his weblog and has just made the code available on his weblog. Nice work.

Extract video data with PHP

Monday, June 6th, 2005

Whilst browsing vimeo’s about pages i noticed they use ffmpeg-php to automatically generate thumbnails from video files. Neat trick!

Wiki rebranded

Monday, March 21st, 2005

A few smart people have rebranded Wiki as Jotspot and set the whole thing up as a Wiki for dummies application for use in companies. The thing is not my style (too much fluff) but at least it looks more accessible than most Wiki applications. What is cool: e-mail to Wiki functionality and combining structured (forms) and unstructured (hypertext) data in a single simple to setup (or so they say) application. Oh, and it’s built with PHP, but which cool ‘new’ (new as in i just recently heard about it) web application isn’t right? ;)

Actually it’s weird that you don’t see more e-mail integration in web apps. E-mail integration is simple to build and everybody uses e-mail…

IBM backs PHP

Thursday, March 3rd, 2005

IBM backs open-source Web software | CNET News.com

Apple & web development

Monday, January 17th, 2005

This weekend i needed to do some programming while at a friends place so i decided to trick out my iBook to make it a full fledged web development machine. After 20 minutes of clicking installer download links for the full LAMP workout i was done. Pretty damn fast. Plus i found a really smart, yet slightly goofily named, code editor for OS X called textmate.

Yet more points for Apple… warn me if i start sounding cult-member like :) I do still have a few gripes with OS X don’t get me wrong. Integration with Windows networks still sucks. And why the f*ck doesn’t Finder always properly refresh a directory when the content changes?

Getting certified: part 1

Tuesday, January 11th, 2005

Ik heb net de eerste 3 uur “online PHP certificatie training”:http://www.phparch.com/cert/training.php erop zitten. Mijn eerste indruk is positief. Het niveau is heel behoorlijk zonder belangrijke basics over te slaan en waar nodig worden er voorbeelden bijgehaald. Verder wordt er ingegaan op best-practice manieren om zaken aan te pakken en wordt overal bijverteld wat qua performance de beste oplossing is. Zelfs van de basic intro al wat dingetjes opgestoken. Een array als een object casten om makkelijk de waardes uit te lezen bijv. handy!

 (object) array("bar"=>"foo"); // object-> bar == foo

Het is te merken dat de instructeur “weet waar hij het over heeft”:http://ilia.ws/projects.php in ieder geval. Minpuntje was de techniek. Geluid viel wel erg vaak weg en men leek niet echt een oplossing te kunnen vinden behalve de hele tijd de conference server herstarten. Nu wel een hoofd vol PHP dus ik ga even wat mindnumbing tv kijken.

Pretty cool…

Thursday, January 6th, 2005

PHP awarded programming language of 2004 - SitePoint PHP Blog

PHP & Security

Monday, January 3rd, 2005

I recommend anyone involved in PHP programming to subscribe to php|architect’s new [phpsec] PHP Security Mailing List. It looks to be a timely news source for new vulnerabilities and is also intented also for the discussion of security issues.