Fritz321 supports this item


15 comments found.

Awesome looking script! GLWS :)

Is it possible for you to do something like this but for the iTunes affiliate program? Or perhaps use this script but link all the music/albums/artists to to the iTunes store?

Will look into that!

Thanks. Keep me updated!

Ok, that’s fine with searching but what the point of this info? I assume to search AND PLAYBACK the music! Just getting image of the artist and song name – useless… What the point? Is there any possibility to playback the found song???

You can integrate this within your project. It’s an LastFM Class.

Is it possible search tracks by tag?

Not yet! Will look into that feature for the next update! :)

The main question

Is there any possibility to playback the found song?

For example this site is parsing music (the URLs with mp3 files to playback) from lastFm

Can I get with your class the URL with mp3 link to insert it into player?

It is an LastFM PHP Class. Not an website. With a little bit knowledge of php you can easily create a website that plays music (you can find the methods in the online demo). This is a class script not a website.

Ok Fritz, sounds better but can you do more examples on your live demo – HOW TO use your class to playback the music from the LastFM? Can you do please some working example if I will type the song name into input field and it returns the player with mp3 url to playback the music?! If you can make it – I will buy it with pleasure!

The method returns an youtube url not an mp3. Also i will not integrate an method that returns an mp3 link this would be illegal, i’m sorry.

hi, this can help me a lot for a project I have in mind.

any chance of integrating with youtube api so people can listen to music.

maybe in radio mode for artist playing (cycling musics from artist) and single mode for one music.

many thanks.

Hi fritz321, great!

I see, in the description in demo functions, that it is done with $lstfm->findVideo($artist, $title); .. but could not find a demo of the actually video itself. Am i missing any thing?


This function will return an youtube url. In the demo you will see that each track has an YouTube icon. This will lead you to an youtube url from that track/song.

Thanks. Right, did miss it!

Hello, today last fm has problems, so the site I’m doing crashes, there is a system to be included if the service is down remove the lens functions!

Will add this!

Google updated their Youtube API V3 and this script uses Youtube API V2 which no longer works and is no longer supported.

Here is my fix for Youtube API V3:

Inside lastfm.class.php you must return url value instead of link; The new url should like like: $url = ‘' . urlencode($matcher) . ‘&maxResults=2&key={YOUR_API_KEY} echo $url;

under lastfm.js ajax result, you must parse the json result: $.getJSON(result,function(data,status,xhr){ var s = JSON.stringify(data); var o = JSON.parse(s); var videoId =; var result = ‘'+videoId+'&feature=youtube_gdata'; if (navigator.userAgent.indexOf(‘Safari’) != -1 && navigator.userAgent.indexOf(‘Chrome’) == -1) {window.location.href = result;} else{,’_blank’);} });

Update send for approval!

What’s new in the update?

Updated to the wrong item. Resubmitted the old one.

Great script, So easy to edit some functions and implement new features from LastFm API.

Thanks for the feedback!

I wonder if there is possibility of adding music download option, as is this website:

Would be possible with a few adjustments.

is possible listen that seft items? good!

What do you mean by “seft items” ? Items of yourself? If that would be the question, no because i’m using the LAST.FM API. If the artist is on it would be possible.

Hi do you have any documentation or a guide on how to use??

Yes, it’s provided with the download.

What is the filename? There is a folder called documentation – but no documentation or guide on how to use within it…..

Any help or response would be great

Hi, On trending tracks: Invalid argument supplied for foreach()... Can this be fix? Thanks.