vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 4.x Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=245)
-   -   Mini Mods - Multiple Registrations with the same IP (Basic) (https://vborg.vbsupport.ru/showthread.php?t=327946)

Sinan COSKUN 04-21-2020 09:00 PM

Multiple Registrations with the same IP (Basic)
 
1 Attachment(s)
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:
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" />  ';



djbaxter 04-22-2020 01:21 PM

Just one caution: with more and more people using tablets and smart phones (well maybe not smart phones with vB4), the registration IP will be that of the mobile carrier so I'm finding that many members have the same IP.


All times are GMT. The time now is 06:46 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.00895 seconds
  • Memory Usage 1,714KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (2)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete