polemios Posted April 8, 2008 Share Posted April 8, 2008 Hi everyone. I am using a simple form where users can select a mp3. Then the form submits certain tracking info to a database and then sends the following header info to the browser: header('Content-type: audio/mpeg'); header('Content-Disposition: attachment; filename="new name.mp3"'); readfile('./filename.mp3'); This works great for me, except for one issue. The issue is that the ID3 tags get lost when the file gets renamed. I would like to have the file retain the ID3 info. One apparently simple solution would be to not rename the file, but the "Content-Disposition" seems to need a filename specified, and even if it's the same name as the file, it treats it as a renamed file. So that isn't an option, I think. I have seen numerous ways of retrieving ID3 info, which it seems is mostly used for music players, but I haven't seen any way in attaching that ID3 info to the file being sent through the header() function. Does anyone know how I can send my clients a file this way while the MP3 retains the ID3 tags on the users computer. -Thanks Link to comment https://forums.phpfreaks.com/topic/100183-retaining-id3-tags-when-sending-mp3-as-attachment-using-header/ Share on other sites More sharing options...
polemios Posted April 8, 2008 Author Share Posted April 8, 2008 >>BUMP<< Please help, if you have any idea which direction to go or if there is another post on this topic. Link to comment https://forums.phpfreaks.com/topic/100183-retaining-id3-tags-when-sending-mp3-as-attachment-using-header/#findComment-512480 Share on other sites More sharing options...
polemios Posted April 9, 2008 Author Share Posted April 9, 2008 I've been scouring the web with my Mozilla Brillo pad and I still can't find any info. SO much about reading ID3 tags, but not anything about retaining them, or attaching them to mp3s send with an attachment header. Should I give up? Did I provide enough information here for someone to address my problem, or at least to commiserate with me? haha Link to comment https://forums.phpfreaks.com/topic/100183-retaining-id3-tags-when-sending-mp3-as-attachment-using-header/#findComment-513165 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.