Secure Downloading Problem
Posted: Sun Jun 19, 2005 5:32 am
Im using a fgets function to download a specified file from my website, but instead of downloading it, it echos it below the button i press to download.
Site: http://www.rscheetah.com/download.php
(click on Cheetah1.0 and see for yourself)
Here is the php script that i made:
Thanks in advance
Site: http://www.rscheetah.com/download.php
(click on Cheetah1.0 and see for yourself)
Here is the php script that i made:
Code: Select all
<FORM method="post" action="downloads.php?file=p1.gif" name="form1">
<input type="submit" name="Submit" value="Cheetah 1.0">
</FORM>
<?php
if($file != "")
{
$fp = fopen('./downloads/'.$file, 'r');
set_time_limit(0);
while(!feof($fp))
{
fgets($fp, 10240);
}
fclose($fp);
}
?>