Hi..
I hav an Turboupload clone script..i Just installed it..But the files are not downloading but uploading successfully...I Made an Modification to .htaccess file that is
Options +FollowSymLinks
RewriteEngine On
RewriteRule ^v/(.+)/(.+).(.+) view.php?key=$1&file=$2
RewriteRule ^d/(.+)/(.+)/(.+).(.+) download.php?key=$1&time=$2
php_value post_max_size 75M
php_value upload_max_filesize 75M
php_value max_execution_time 6000000
to
Options +FollowSymLinks
RewriteEngine On
RewriteRule ^v/(.+)/(.+).(.+) view.php?key=$1&file=$2
RewriteRule ^d/(.+)/(.+)/(.+).(.+) download.php?key=$1&time=$2
I think the problem is in .htaccess if not here is my download.php file plz giv a look at this..
<?php
require_once("admin/config.php");
require_once("conn.php");
require_once("functions.php");
$strSql = "select * from ".DB_TABLE_PREFIX."files where `key` = '".$_REQUEST['key']."'";
$rsFile = $conn->execute($strSql);
if((time() - $_REQUEST['time']) > EXPIRE_LINK){
goto(SITE_URL."/v/".$_REQUEST['key']."/".$rsFile->fields['filename']);
exit();
}else{
if(!empty($_REQUEST["key"])) {
$strSql = "select * from ".DB_TABLE_PREFIX."files where `key` = '".$_REQUEST['key']."'";
$rsFile = $conn->execute($strSql);
if(!$rsFile->EOF){
if($rsFile->fields["uploadtime"] >= (time()-(MAX_DAYS*86400)) && $rsFile->fields["downloads"] < MAX_DOWNLOADS) {
$strSql = "update ".DB_TABLE_PREFIX."files set downloads = downloads+1, lastaccess='".time()."' where `key` = '".$_REQUEST['key']."'";
$conn->execute($strSql);
$filename=$rsFile->fields["filename"];
$folder_name = $rsFile->fields['foldername'];
$file = SITE_URL.$folder_name.$rsFile->fields["filename"];
header("Cache-Control: must-revalidate, post-check=0, pre-check=0");
header("Content-Type: application/octet-stream");
header("Content-Length: " . $rsFile->fields['filesize']);
header("Content-Disposition: attachment; filename=$filename");
readfile($file);
}else {
alert("Download link expired Or too many downloads");
goto(SITE_URL."/index.php");
}
}
}
}
?>
Here is the test File
http://upload.legendarydevils.com/v/1487074/menu_paypal.gif.html