If I click mare that 1 time on banner my PHP function counting it, maybe are some solution to count only 1 click, or create faster redirection that user not have time to click more that 1 time ?
This is my function:
function wp125_adclick() {
if (isset($_GET['adclick']) && $_GET['adclick'] != "" && ctype_digit($_GET['adclick'])) {
$theid = $_GET['adclick'];
global $wpdb;
$adtable_name = $wpdb->prefix . "wp125_ads";
$thead = $wpdb->get_row($wpdb->prepare(
"SELECT target FROM {$adtable_name} WHERE id = %d",
$theid
));
$theid = $wpdb->escape($theid);
$update = "UPDATE ". $adtable_name ." SET clicks=clicks+1 WHERE id='$theid'";
$results = $wpdb->query( $update );
header("Location: $thead->target");
exit;
}
}