Jump to content


Photo

Single file download through php redirect?


  • Please log in to reply
1 reply to this topic

#1 jkrettek

jkrettek
  • New Members
  • Pip
  • Newbie
  • 1 posts

Posted 08 June 2006 - 11:59 PM

I have a page called download.php that takes a GET variable such as 'album_track=344' and allows the user to download that specific file (after a query to the database for the file location) through a forced download (theres no actual page loading, the php file simply loads the headers and the browser takes over from there).

This is a way for me to hide the actual file location as well as perform some record keeping tasks. The issue is that apache/php only allow one download at a time from the specific connection. For example, you select one song to download and it pops up the "Download" box and begins downloading and then you select another song to download, the second prompt box won't popup until the first song has completed.

Perhaps it's because the session is trying to use the download.php script when it's occupied already for that browser connection?

Is there some way to fix this? It's rather annoying to limit it to only one song at a time.

#2 highphilosopher

highphilosopher
  • New Members
  • Pip
  • Newbie
  • 5 posts

Posted 09 June 2006 - 02:01 AM

[!--quoteo(post=381652:date=Jun 8 2006, 06:59 PM:name=Mr. Awesome)--][div class=\'quotetop\']QUOTE(Mr. Awesome @ Jun 8 2006, 06:59 PM) View Post[/div][div class=\'quotemain\'][!--quotec--]
Is there some way to fix this? It's rather annoying to limit it to only one song at a time.
[/quote]

Did you try using

header("Location: http://file location");

to redirect them to the download? This might let the file close and allow more than one d/l




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users