Skip to content

svbnet/last-chorus

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Last chorus

A PHP utility that gets the chorus of the most recent last.fm track you scrobbled. You'll need a last.fm developer account and musixmatch account as well.

Usage

Include it, then call last_chorus(), preferably as a cron job every half hour or so (to limit resource use). The demo files should get you started and give you some inspiration.

last_chorus() is the only function you need to know about, and returns an array of:

Things you need to know

  • Some songs may contain profanity. You can either use a profanity filter or check if the restricted property of the lyrics is true.

  • I haven't tested this out on every song so you may get an error or not the complete chorus, as the lyrics cut off at 30% on a non-commericial musixmatch API account.

  • if you call last chorus frequently, musixmatch, last fm, your users and your webhost won't be happy.

TODO

  • Put this into a class

About

Chorus getting in PHP

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages