A kmeans clustering implementation I wrote in PHP while at flickr. Only interesting as a possible reference, because I do believe it works.