Hide Download file URL

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

User avatar
social_experiment
DevNet Master
Posts: 2793
Joined: Sun Feb 15, 2009 11:08 am
Location: .za

Re: Hide Download file URL

Post by social_experiment »

Xeolex wrote:anyone knows whats the problem??
and what can i do to overcome this error??
The file is clearly to big, larger than 128MB, you have to either use a smaller file or update your php.ini to accomodate the larger file
http://php.net/manual/en/ini.core.php
“Don’t worry if it doesn’t work right. If everything did, you’d be out of a job.” - Mosher’s Law of Software Engineering
Xeolex
Forum Newbie
Posts: 11
Joined: Fri Nov 18, 2011 9:00 am

Re: Hide Download file URL

Post by Xeolex »

900 mb

i have use some other download manager script..
it was able to download the same file, without changing the ini file.
User avatar
twinedev
Forum Regular
Posts: 984
Joined: Tue Sep 28, 2010 11:41 am
Location: Columbus, Ohio

Re: Hide Download file URL

Post by twinedev »

First, if you use another file that works fine, why this thread??

It most likely needs to chunk out the data to the browser instead of reading in the whole file, try the following instead of the readfile($path); line:

Code: Select all

$handle = fopen($path,'rb');
while (!feof($handle)) {
  echo fread($handle, 8192);
}
fclose($handle);
Of course then you also have the issue of how long the download takes. You may max out the maximum execution time.

-Greg
Xeolex
Forum Newbie
Posts: 11
Joined: Fri Nov 18, 2011 9:00 am

Re: Hide Download file URL

Post by Xeolex »

First, if you use another file that works fine, why this thread??
the other script is bit complicated and i cant modify it to my needs..

thank for the code i will check it out..

btw how is others(download manager scripts) doing this?
Post Reply