Jump to content

Archived

This topic is now archived and is closed to further replies.

jkrettek

Single file download through php redirect?

Recommended Posts

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.

Share this post


Link to post
Share on other sites
[!--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) [snapback]381652[/snapback][/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

[code]
header("Location: http://file location");
[/code]

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

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.