Sinan COSKUN
04-21-2020, 09:00 PM
Hello to everyone.
With the code snippet below, you can prevent registration with the same IP within 1 hour.
If you have a limited download site, it might work for you.
1 - Logon to your AdminCP
2 - Goto Plugins & Products -> Add New Plugin
a- Products : Vbulletin
b- Hook: register_start
c- Title: IP Block
d- ord app: 5
e- PHP Code:
global $db, $vbulletin;
$user_ip = strtoupper($_SERVER['REMOTE_ADDR']);
$rcek= $db->query("SELECT * FROM " .TABLE_PREFIX."user WHERE ipaddress = '".$user_ip."' AND lastactivity >= unix_timestamp(CURRENT_TIMESTAMP - INTERVAL 60 MINUTE)");
$result = $db->num_rows($rcek);
if($result !== 0){
echo '<meta http-equiv="refresh" content="3;URL=YOUR_SITE_URL" /> ';
}
With the code snippet below, you can prevent registration with the same IP within 1 hour.
If you have a limited download site, it might work for you.
1 - Logon to your AdminCP
2 - Goto Plugins & Products -> Add New Plugin
a- Products : Vbulletin
b- Hook: register_start
c- Title: IP Block
d- ord app: 5
e- PHP Code:
global $db, $vbulletin;
$user_ip = strtoupper($_SERVER['REMOTE_ADDR']);
$rcek= $db->query("SELECT * FROM " .TABLE_PREFIX."user WHERE ipaddress = '".$user_ip."' AND lastactivity >= unix_timestamp(CURRENT_TIMESTAMP - INTERVAL 60 MINUTE)");
$result = $db->num_rows($rcek);
if($result !== 0){
echo '<meta http-equiv="refresh" content="3;URL=YOUR_SITE_URL" /> ';
}