ultrus Posted April 16, 2007 Share Posted April 16, 2007 Hello, I'm posting a podcast feed that makes reference to audio files for download. Instead of linking to the files directly (e.g. www.mywebsite.com/podcast.mp3), I want to link to the file as get variables so that I can track number of listeners (e.g. www.mywebsite.com/?audio=podcast.mp3). Where would I look to get something like this to work? How do I start sending audio data to the user using a link like this? Thanks much Link to comment https://forums.phpfreaks.com/topic/47204-solved-dynamic-download-link-not-direct-file-link/ Share on other sites More sharing options...
Lumio Posted April 16, 2007 Share Posted April 16, 2007 Make that in the top of you script: <?php header('Content-type: audio/mpeg'); readfile('podcast.mp3'); exit; ?> Link to comment https://forums.phpfreaks.com/topic/47204-solved-dynamic-download-link-not-direct-file-link/#findComment-230202 Share on other sites More sharing options...
cyrixware Posted April 16, 2007 Share Posted April 16, 2007 save your .mp3 in a directory as well as save the file name of the music.mp3 to the dbase. In this case it will prevent the direct downloads like www.mywebsite.com/podcast.mp3. use dbase for that. Regards, Frederick Link to comment https://forums.phpfreaks.com/topic/47204-solved-dynamic-download-link-not-direct-file-link/#findComment-230203 Share on other sites More sharing options...
ultrus Posted April 16, 2007 Author Share Posted April 16, 2007 Ah! Just what I needed. Thanks much for the help! Much appriciated. Link to comment https://forums.phpfreaks.com/topic/47204-solved-dynamic-download-link-not-direct-file-link/#findComment-230205 Share on other sites More sharing options...
cyrixware Posted April 16, 2007 Share Posted April 16, 2007 cheers ultrus! Link to comment https://forums.phpfreaks.com/topic/47204-solved-dynamic-download-link-not-direct-file-link/#findComment-230230 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.