09-02-2009, 06:10 PM
|
#8 (permalink)
|
|
The Acquainted
Join Date: Oct 2008
Location: Cincinnati
Posts: 151
Thanks: 14
|
Quote:
// Check of expired download links
$expire = time() - 30 * 60 * 60; // Links created 30 minutes ago are expired
$sql = "DELETE FROM access WHERE down_created < {$expired}";
mysql_query($sql);
// Now process the download
$id = $_GET['id'];
$id = mysql_real_escape_string($id);
$sql = "SELECT * FROM access WHERE down_id='{$id}'";
$rs = mysql_query($sql);
if (mysql_num_rows != 1) {
die('Unauthorized access!');
} else {
// Allow download of file
}
|
I understand that more than any of the others my problem is actually knowing how to set it up correctly on a page and working.
|
|
|
|