I have the following download script:
where $download is the full url of the fileCode:<?php Header ( "Content-Type: application/octet-stream"); Header( "Content-Disposition: attachment; filename=$saveas"); readfile($download); ?>
and $saveas is the name of the file...
however when I try to download anything, it saves the as _____.zip like it should, but the filesize is only a few bytes, when it should be many MB. And if you open the .zip in notepage you get the following error:
<br />
<b>Warning</b>: readfile() [<a href='http://www.php.net/function.readfile'>function.readfile</a>]: php_network_getaddresses: gethostbyname failed in <b>home\www\html\read.php</b> on line <b>4</b><br />
<br />
<b>Warning</b>: readfile(http://thedomain.com/myfilesfordownload/theziptodownload.zip) [<a href='http://www.php.net/function.readfile'>function.readfile</a>]: failed to create stream: Invalid argument in <b>home\www\html\read.php</b> on line <b>4</b><br />
What does this mean.. what is wrong...