Thanks for the help. I have another question though.
I found a script that I tried prior to my first post and for some reason I can't get it to work. I was wondering if someone might be able to tell me why it won't work.
When I click the link to the file, the save box comes up, then the page goes blank and the page URL goes from http://home/username/subdirectory/data/download.php to http://home/username/subdirectory/data/download.php?0 but the file downloads fine.
The person who created the script doesn't have this problem because I checked out a demo on his/her website. Unfortunately, I can't seem to contact the person to ask them about it. Anyone hae any ideas on what the problem might be?
This is an example of the script I'm using.
<?
$files=array( 'test.zip');
$filenames=array( 'This is a Test.zip');
$additional_info=array( 'This is a test file : unknown bytes');
$url= "/home/username/subdirectory/data/";
/ When the files are on another server, use the
whole address (http://www.server.com/dir/) in stead of /home/username... /
$referer=ereg_replace( "\?.", "",$HTTP_REFERER);
$thisfile= "http://$HTTP_HOST$PHP_SELF";
if ($referer!=$thisfile){
echo "<center><big>Homepage: <a href=\"http://home/username/subdirectory/data\">[url]http://home/username/subdirectory/data[/url]</big><br><hr><br><br></center>";
for ($i=0;$i<count($files);$i++)
echo "<P><A HREF=\"$PHP_SELF?$i\">",$filenames[$i], "</A> $additional_info[$i]\n";
}
else {
$i=$QUERY_STRING;
$total=$url . $files[$i];
Header ( "Content-Type: application/zip");
Header ( "Content-Length: ".filesize($total));
Header( "Content-Disposition: attachment; filename=$test.zip");
readfile($total);
}
?>