Hi,
I want to be able to open a Binary file from a different server and then Each the contence. I have so far developed this code:
$download_url = "http://www.n-12.net/web/files/adminimage100.zip";
$fp = @fopen($download_url, "rb") or die($file_error);
$content = '';
while (!feof($fp)) { $content .= fgets($fp, 1024); }
fclose($fp);
header('Content-Type: application/octet-stream');
header('Content-Disposition: attachment; filename="file.zip"');
echo $content;
That code will work if i want to download just a normal HTML or Text file but with binary files it will open part of the binary file but when you try and open the zip file it says that is not a valid archive!
Does anyone have an idea that might solve my problem?