Go Back   vb.org Archive > vBulletin Modifications > vBulletin 4.x Modifications > vBulletin 4.x Add-ons
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
IP Blocker Widget Details »»
IP Blocker Widget
Version: 1.00, by DHS2 DHS2 is offline
Developer Last Online: Jan 2019 Show Printable Version Email this Page

Category: Miscellaneous Hacks - Version: 4.x.x Rating:
Released: 12-14-2010 Last Update: Never Installs: 7
Template Edits
 
No support by the author.

Description:
Deny access to IP address array
Installation:
Create a new widget or forum side block (direct php execution)

Title for example "IP Blocker"
Description "IP Blocker Array"

Paste this code on widget configuration and save:
PHP Code:
$blacklist = array("127.0.0.1""127.0.0.1""127.0.0.1"); 
if(
in_array($_SERVER['REMOTE_ADDR'], $blacklist)) { 
    
header("Location: http://www.fbi.gov"); 
    exit(); 
}else{ 
$output '<center><img src="images/misc/security.png" /></center>';

Setup:
change 127.0.0.1 with the ip you want to block
change "security.png" with your desidered image
change "http://www.fbi.gov" with the link desidered to redirect

This is my first version (is a simple code)
If the user's IP number is contained in the array will be redirected to the FBI homepage, otherwise this will print the image. png

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #2  
Old 12-15-2010, 07:13 AM
zelnik zelnik is offline
 
Join Date: Aug 2008
Posts: 374
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

sorry but i'm confused what this does over the built in ip ban that has been in vb since day 1?
Reply With Quote
  #3  
Old 12-15-2010, 07:47 AM
DHS2's Avatar
DHS2 DHS2 is offline
 
Join Date: Nov 2010
Location: Switzerland
Posts: 9
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by zelnik View Post
sorry but i'm confused what this does over the built in ip ban that has been in vb since day 1?
This is not ip ban, is a simple mod for block determinated ip addresses to view the forum (or home page in case of publishin suite).
Reply With Quote
  #4  
Old 01-05-2011, 06:34 PM
Delphiprogrammi Delphiprogrammi is offline
 
Join Date: Feb 2004
Location: Landen(Belgium)
Posts: 1,335
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

this is easy it will not block the ip address contained in the array but they will be redirected to the configuerd url this might scare spammers
Reply With Quote
  #5  
Old 04-06-2011, 03:54 AM
DNN DNN is offline
 
Join Date: Mar 2011
Posts: 125
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I'm a lil' confused on this one too
Reply With Quote
  #6  
Old 04-06-2011, 10:21 AM
Rahstyles Rahstyles is offline
 
Join Date: Jul 2008
Posts: 214
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hey man this is freaking neat!!! it works.. very nice.. im supposing .. if you have multiple ip's u can put an extra "" and put the ip inbetween correct?
Reply With Quote
  #7  
Old 04-06-2011, 03:34 PM
DHS2's Avatar
DHS2 DHS2 is offline
 
Join Date: Nov 2010
Location: Switzerland
Posts: 9
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

This is a simple code that I had to get rid of some people several months ago.
If you want you can develop in many different ways and it also interact with the database for example.

You can add more IP numbers if you want.
"127.0.0.1", "127.0.0.1", "127.0.0.1", "m.o.r.e", "m.o.r.e", "m.o.r.e" etc. etc.

(the best way is modify the code and download array from database or an external .txt file for many ip's)

(Sorry for my bad english)
Reply With Quote
  #8  
Old 04-17-2011, 08:36 AM
DNN DNN is offline
 
Join Date: Mar 2011
Posts: 125
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Where is the download link?
Reply With Quote
  #9  
Old 07-23-2011, 01:04 PM
LorinPotter LorinPotter is offline
 
Join Date: Jan 2008
Location: Luzerne, Iowa
Posts: 80
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Excellent, and something that I'm wanting for my VB 3.7.

Can someone please provide me with the varable name used in 3.7 for the incoming IP?
Reply With Quote
Reply


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 09:01 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.07509 seconds
  • Memory Usage 2,298KB
  • Queries Executed 25 (?)
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)bbcode_php
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (4)navbar_link
  • (120)option
  • (9)post_thanks_box
  • (9)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (9)post_thanks_postbit_info
  • (8)postbit
  • (9)postbit_onlinestatus
  • (9)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_postinfo_query
  • fetch_postinfo
  • 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
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete