Forum Moderators: coopster

Message Too Old, No Replies

Redirect direct link to media via download manager

Almost have it working but one snag

         

runey71

6:02 am on Apr 22, 2009 (gmt 0)

10+ Year Member



What I am trying to do is redirect any attempts of direct links to certain media files and redirect them via a download manager so I can track the number of downloads...

I have done the redirect in .htaccess and it seems to be working... It grabs any MP3 and redirects it to example.com/download.php?podcast=podcast_path

That is all good... It opens download.php and I can get the podcast_path... Then I perform a mysql_query to get the id of the MP3...

Then I construct a path to the download manager so it can handle the download... http://example.com/index.php?option=com_rokdownloads&view=file&task=download&id=n

What I don't know how to do is then exit out of download.php and execute the generated url...

I tried putting a header to the generated url at the bottom but the id was always empty...

Thanks...

EDIT: All right I'm officially over tired and making stupid mistakes... The header was the right thing to do but I was pointing to the wrong field in the database... So of course id was always empty... Point to the right field and all is good :)

dreamcatcher

8:52 am on Apr 26, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Hi runey71, glad you got your problem sorted.

dc