Go Back   vb.org Archive > Community Discussions > Modification Requests/Questions (Unpaid)
  #1  
Old 02-14-2007, 12:17 PM
poprulz poprulz is offline
 
Join Date: Oct 2005
Posts: 47
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default IP Location Findwer and Blocker

I happend to chek this thread

https://vborg.vbsupport.ru/showthread.php?t=53923

which was for 2.2.x to automatically detect new users at registrations and asign to the country by checking the ip.

I was wondering if a system is feasible where the user is checked by the ip and if he/she is from particular location deny access or add to a particular user group directly.

So that the usergroup has custom permissions. It sounds cool... so that users could be distinguished by location or country.

IP pool space for countries could be used for this i guess. any light in this topic?
Reply With Quote
  #2  
Old 05-31-2007, 03:46 PM
Webdude? Webdude? is offline
 
Join Date: Jan 2002
Posts: 48
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

So far I have found....

Updated List of IP's
http://ip-to-country.webhosting.info...ountry.csv.zip

A script to import the file to your database
http://willem.creationpoint.nl/ip2co...o_country.phps

And the script you link to above
https://vborg.vbsupport.ru/showthread.php?t=53923

Or as this post shows
Quote:
I wrote a little script to convert the csv file to sql import script:
#!/bin/php
$lines=file('ip-to-country.csv');
foreach($lines as $line){
$line=trim($line);
if(!preg_match('/^"([0-9]+)","([0-9]+)","(.{2})","(.{3})","(.*)"$/',$line,$matches)){
echo "error";
}else{
echo 'insert into ip2c values("'.($matches[1]).'","'.($matches[2]).'","'.($matches[3]).'","'.($matches[4]).'","'.($matches[5]).'");'."\n";
}
}
?>

Usage:
copy this script and .csv file in the same dir then run:
convert.php >ip2c.sql
Maybe a coder can update it, or maybe I will... though I prefer a "professional" to do it.... I'm sure there's one here around somewhere

Actually, I may go ahead and try this as I need this.
Reply With Quote
  #3  
Old 05-31-2007, 05:59 PM
Webdude? Webdude? is offline
 
Join Date: Jan 2002
Posts: 48
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

The old hack doesnt work. However, if anyone feels like updating the hack, here's an updated sql import file for it.
Attached Files
File Type: zip ip2country.zip (661.0 KB, 5 views)
Reply With Quote
  #4  
Old 07-18-2012, 08:27 AM
sv1cec sv1cec is offline
 
Join Date: May 2004
Location: Athens, Greece
Posts: 2,091
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I am using the IP2COUNTRY data in my site, to trap spammers. What I do, is give them a drop-down menu with selection for the country they are in. Then I compare that country with the country shown by their registration IP. If those two do not match, then the person or the script attempting to register gets a "Thank you for your registration, you will receive an email etc" message, which of course they never receive, while their IP is entered in the banned IP list in the vBulletin options. Another simple anti-spam measure, is to check the TimeZone of the country entered, vs the Timezone selected by the person/script trying to register. If they do not match, then again, the IP is banned. Finally, one other measure, simple but effective: if the time taken to fill in the registration form is less than (say) 20 seconds, there is no way a person is trying to register, it's probably a script, so again, the IP is banned. In about one year I am running these checks, they has trapped more than 25,000 IP addresses and greatly reduced the number of spammers registering in our site.

However, I've done those modes in vB 3.0.17. I have no idea how to do the same things in 4.2, so if someone can do it, I would be grateful.
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 08:00 PM.


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.03895 seconds
  • Memory Usage 2,202KB
  • Queries Executed 12 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (4)post_thanks_box
  • (4)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (4)post_thanks_postbit_info
  • (4)postbit
  • (1)postbit_attachment
  • (4)postbit_onlinestatus
  • (4)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • postbit_attachment
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete