Current location: Hot Scripts Forums » Programming Languages » PHP » Make Forum LOCAL IP's only


Make Forum LOCAL IP's only

Reply
  #1 (permalink)  
Old 04-21-04, 04:56 AM
Dude22222a Dude22222a is offline
Newbie Coder
 
Join Date: Apr 2004
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Make Forum LOCAL IP's only

Just installed Invision Power Board yesterday.
I try to make forum so only ppl who canr gister there or access can be ppl from same network as me e.g. IP range : 123.123.123.1 - 123.123.123.255
I want to all other ips to have bann and only this range could access my forum.
How can i do it using invision board?
I manadge to find there option to ban IP's but i want make it vice versa so i could bann all ip's and allow only this range.

I know this may be easy to do but i dont know non PHP non MySQL so any help will be usefull.
Reply With Quote
  #2 (permalink)  
Old 04-21-04, 02:05 PM
clintre clintre is offline
Newbie Coder
 
Join Date: Aug 2003
Posts: 52
Thanks: 0
Thanked 0 Times in 0 Posts
This is a crude way to do this, but it works and it is all the time I have right now.

PHP Code:



<?php
$CheckIP 
$_SERVER["REMOTE_ADDR"];

$ValidateIP substr($CheckIP,0,11);

if (
$ValidateIP != '123.123.123') { die ("You are not authorized to view this page!"); }

?>
The number 11 above represents the part of the string you want to use. If you are not using 3 numbers per octet this number will need to change accordingly.

If this is not good enough for you I will cook something else up. I just do not have the time right now.
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
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 Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
make money w/ just 6 dollars-legitimate! marilpowe3 General Advertisements 0 02-07-04 02:16 AM


All times are GMT -5. The time now is 10:27 AM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.