Hi,
I am using this PHP script to download a file:
$status=stripos($_SERVER['HTTP_REFERER'],'servername');
if($status===false)
{
header('Location:http://xyz.com);
}
else
{
header('Content-disposition: attachment; filename=XXX.pdf');
header('Content-type: application/pdf');
readfile('http://www.xyz.com/Downloads/XXX.pdf);
}
However when I download the file in any browser it says it is corrupt.
Please Help!