09-02-2009, 03:48 AM
|
#1 (permalink)
|
|
The Acquainted
Join Date: Oct 2008
Location: Cincinnati
Posts: 151
Thanks: 14
|
Random links
I am having a problem, I am trying to setup a random id generator with php and mysql. I want it so that when people purchase the product it gives them a download link but I do not want them to have the link for ever. I want the link to last like 30 minutes. So what I want to do is make it do is when the product is purchased it last 30 minutes but then it cancels out and it gives the file a new ID. Can anyone help me? I am lost so far. Here is what I got so far.
PHP Code:
<?php
$id = $_GET['id'];
$links = array(
"download" => "http://www.domains.com/path/to/file.zip"
);
header("Location:".$links[$id]);
exit;
?>
|
|
|
|