What I mean is, if you read below code, you will see that if the user request the download.php file, he will get a file named (uuuuu.zip).
I want to specify another name for the file according to user ID in my DB.
I hope that you know what i mean.
Thanks 🙂.
<?
/ Download File /
include "../variable.php";
if($site_available==1) {
if($save_available==1) {
$db = mysql_connect("$server", "$db_user", "$db_pass");
mysql_select_db("$database", $db);
$sql = "select * from anasheed where id = $id";
$result = mysql_query($sql);
while($row=mysql_fetch_array($result)) {
$url_li = $row["save"];
}
$ip = getenv ("REMOTE_ADDR");
$seconds = (24-date("H"))60;
$seconds = $seconds-(date("i")60);
session_id($ip);
session_start();
if(!$Visitor_limit_download_IP && !$Visitor_limit_download_Counting) {
session_set_cookie_params(time()+$seconds);
setcookie("ggggg",44,time()+3600);
header("Location: [url]http://www.MySite.com/uuuuu.zip[/url]");
} else {
if($Visitor_limit_download_Counting<$MAX_COUNT) {
$Visitor_limit_download_Counting++;
header("Location: http://www.fanateq.com/uuuuu.zip");
} else {
}
}
} else { echo '<p align="center"> </p>
<p align="center"> </p>
<p align="center"> </p>
<p align="center"><b>Service Unavailable</b></p>
<p align="center"><b><a href="javascript:history.back(1)">Back</a></b></p>';
}
} else {
echo '<p align="center"> </p>
<p align="center"> </p>
<p align="center"> </p>
<p align="center"><b>Service Unavailable</b></p>
<p align="center"><b><a href="javascript:history.back(1)">Back</a></b></p>';
}
?>