Greetings,
I have the following code on my software download page to assure that no one can download the software w/o correct authentication:
Works in FF, not IE. When i try it in IE, it states the following:
"IE cannot download title2.php from www. IE was not able to open this Internet site. The requested site is either unavailable or cannot be found. Please try again later."
Any ideas? Thanks!
I have the following code on my software download page to assure that no one can download the software w/o correct authentication:
Code:
<?php
session_start();
if (isset($_SESSION['fullname']))
{
//Location of file, must be out of web root
$file_location='/downloads/FileZilla_2_2_7c_setup.exe';
//open file
$file=fopen($file_location,'r');
//get file size
$file_size=filesize($file_location);
//read the file
$content=fread($file,$file_size);
//close the file
fclose($file);
//supply the right file format
header('Content-type: application/exe');
//force browser to prompt to download file
//cool option of this header is that allows you to rename the file
header('Content-Disposition: attachment; filename="FileZilla_2_2_7c_setup.exe"');
//finally echo content
echo $content;
}
else
{
header("Location: [URL unfurl="true"]https://www");[/URL]
}
?>
Works in FF, not IE. When i try it in IE, it states the following:
"IE cannot download title2.php from www. IE was not able to open this Internet site. The requested site is either unavailable or cannot be found. Please try again later."
Any ideas? Thanks!