Hi there!
I've been using this code for sometime now, just noticed that this code doesn't let many users to download any files, many are redirected to hotlink.php without even getting the files... someusers are able to download using DAP but other download managers are getting the hotlink.php only..
Can anyone fix the code, please...
<?php
if (!eregi("mydomain.com",getenv("HTTP_REFERER")))
{
header("Location: hotlink.php");
exit();
}
else
{
if (file_exists("downloads/x777926Odwp3j7/".urldecode($_GET['get'])) )
{
header("Pragma: no-cache");
header("Cache-Control: no-store, no-cache",false);
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT",false);
header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT",false);
header("Cache-Control: must-revalidate",false);
header('Content-type: application/force-download',false);
header('Content-Transfer-Encoding: Binary',false);
header("Content-Disposition: attachment; filename=".urldecode($_GET['get']),false);
header('Content-length: '.filesize("data/".urldecode($_GET['get'])),false);
header('Content-disposition: attachment;filename='.urldecode($_GET['get']),false);
readfile("downloads/x777926Odwp3j7/".urldecode($_GET['get']));
exit();
}
else
{
header("Location: hotlink.php");
exit();
}
}
?>
thanks in advance..