

![]() |
| ![]() | |||||||
|
![]() |
| | LinkBack | Thread Tools | Display Modes |
| | #1 (permalink) |
| Platinum Lifetime Member | Hello, I'm using a script that allows my clients to download files from my store. The problem I'm running into is that for some reason the download stops at around 5 minutes. I'm guessing it's hitting the max_execute_limit set by the web host. Below is the code that I'm currently using. Can anyone suggestion a different method to allow people to download large files? What I think would be if I could redirect the user to the actual file once I validate that the person has access to the file but that would mean giving the person direct access to the folder which I don't want to do. PHP Code:
__________________ Video Script - The ultimate media site script AutoVideoScript com - Run your own youtube sharing site |
| | |
| Sponsored Ads |
| | #2 (permalink) |
| Old school Name: Luc L. Last Online: Today 07:43 PM iTrader: (7) Join Date: Jul 2002
Posts: 1,551
DNF$: 13,027 Location: Los Angeles
Country: | There are a few ways of handling this... 1. Simply increase the max execution time of your PHP scripts in PHP.ini so that it can run for more than 5 minutes. 2. Create a temporary directory that's web accessible. Then LINK (ln -s) the file the user is trying to download, to a temporary file with a random filename (ex: ln -s SOURCEFILE /www/site/tmp/RANDOMFILE.zip) and using PHP use header("Location: URLTOTMPFILE). That will basically send a redirect header to the remote host, and then apache will handle the actual download. Since you're using file linking in option #2, the file doesn't use up any space on your PC but also doesn't reveal the true path and filename of the actual file, but rather some temporary file (which you can delete from cron every XX days). Good luck, Luc L.
__________________ Looking for type-in domains? Page Rank Domains? Link Popularity Domains? Alexa Domains? Domain Research Tool Finds, Tracks and Acquires domains. |
| | |
| | #3 (permalink) | |
| Platinum Lifetime Member | Luc, you're a genius. I tried 1 already but 2 is a great idea. I'll have to try that. Thanks. Quote:
__________________ Video Script - The ultimate media site script AutoVideoScript com - Run your own youtube sharing site | |
| | |
| | #4 (permalink) |
| Old school Name: Luc L. Last Online: Today 07:43 PM iTrader: (7) Join Date: Jul 2002
Posts: 1,551
DNF$: 13,027 Location: Los Angeles
Country: | No problemo bro. If you need sample code or something shoot me a PM. I use that second method all the time. Just make sure you read up on the LN command (file linking) so you know how it works, but it should be fairly simple. Good luck! Luc
__________________ Looking for type-in domains? Page Rank Domains? Link Popularity Domains? Alexa Domains? Domain Research Tool Finds, Tracks and Acquires domains. |
| | |
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
| |