Quote:
Originally Posted by AndrewD
What you've seen in the code is to disallow double recording of a hit in the database if the user clicks the same link twice in quick succession - I found that we were recording multiple hits if people got tired or were trigger happy.
If you're looking to prohibit multiple hits, then you have to put some similar code in another place. Go down to the lines that read
PHP Code:
if ($_REQUEST['action'] == "jump" or $_REQUEST['action'] == "stream") {
$time = TIMENOW;
unset($url);
and add something like:
PHP Code:
$jumplink = $DB_site->query("
SELECT * FROM ".THIS_TABLE."linksdownloads
WHERE userid='$userid'
ORDER BY usertime DESC
LIMIT 1
");
while ($jump=$DB_site->fetch_array($jumplink)) {
if ($time-$jump['usertime']) < YOUR_LIMIT) {
eval(print_standard_error('You will have to wait...',0));
exit;
}
exit;
}
|
all that code is giving me is a BLANK page. I replaced YOUR_LIMIT with 60 for 60 seconds, that didnt work.