Allow php code in song name


What file or files would I need to change to allow php code to be entered into the song name in the back end?

For example, Instead of:


I want to enter a song called:
(uploaded image as forum is broken as to not allow code display to work properly)

This way i can set a session ID for each song and expire it after a predetermined time as well as link to a location I have set in a database instead of the actual file location.

So basically have that full string saved, as is, in the MC database and then have MC parse the php code, in that string, as php and not as just plain text when it sends the song to the player.
Responses (1)
  • Accepted Answer

    Friday, December 28 2012, 05:44 PM - #Permalink
    well... for starters you'd need to allow all the code to be stored (on the model file, when saving, you need to specify this), but most of all you need to call some kind of "parse" function everything you "render" the filename... best way is to do it on the helper.php file

    seaerch for:

    function getSongFileURL($song){

    as usual.. use at your own risk! this can be a delicate task to perform, so be careful! :)
    The reply is currently minimized Show
Your Reply