unknowncheats uc-forum.com ucdownloads ucdownloads.com

Go Back   UC-Tutorials - Multiplayer Game Hacking and Cheat Tutorials > Web / Scripting > PHP

- Sponsored Advertisement -
http://www.myfpscheats.com/


Reply
 
Thread Tools Display Modes
  #1  
Old 12-23-2006, 08:05 AM
zero_tolerance zero_tolerance is offline
Senior Member
 
Join Date: Dec 2006
Posts: 289
Default Basic Ip Ban Script (Allowing Certain IPs only)

By Rich

Also, after thinking about it, you could change the script to only let certain IPs view the website.

PHP Code:
<?php
    $ip 
getenv('REMOTE_ADDR');

    
$allowz1 "000.000.000"
    
$allowz2 "000.000.000"
    
$allowz3 "000.000.000"


    
if($ip == $allowz1 || $ip == $allowz2 || $ip == $allowz3)
    {
    }
    else
    { 
        echo 
"You are not authorized to view this site."
    
}
?>
I have no idea if the code above would work, since I don't know if PHP allows me to make a check and then not do anything with it. But you get the idea, and anyone with minimal PHP skills could make that work.
Reply With Quote
Reply

  • Submit Thread to Digg
  • Submit Thread to del.icio.us
  • Submit Thread to StumbleUpon
  • Submit Thread to Google
  • Submit Thread to Facebook
  • Submit Thread to My Yahoo!
  • Submit Thread to MySpace
  • Submit Thread to Twitter
  • Submit Thread to Reddit

Tags
allowing, ban, basic, ips, script

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



All times are GMT. The time now is 04:03 PM.