-=[ rgdh ]=--=[ GrOuP]=-

All Booters Hacking And Cracking Sotware And Much More ______Comming So0on_____
 
HomeFAQSearchRegisterMemberlistUsergroupsLog in

Share | 
 

 Basic IP Ban script

Go down 
AuthorMessage
__Red_EyEs__
Admin
avatar

Number of posts : 306
Age : 33
Registration date : 2007-07-10

PostSubject: Basic IP Ban script   Wed Jul 11, 2007 4:08 am

Okay, heres something quick. All it really does is grab the user's IP and then check it against a list of banned users. If the IP matches a banned one, then it stops them from viewing the site and gives them a message. The code is quite basic, but I'll explain some anyway.


PHP Code:

<php>
Pretty simple stuff, but it does the job. Let's explain it a little.

- $ip = getenv('REMOTE_ADDR'); - I'm assigning the person's IP to the variable $ip. $ip is used when checking the IP against the banned list.
- $email = "your@mail.com" - Change
[email]your@mail.com[/email] to your e-mail. This gives people a chance to contact you in case of a mistake.
- $banzored1 = "000.000.000" - Change the 0's to the person's IP you wish to ban. That assigns the banned person's IP to the variable. It is the same with banzored1 to 3.
- if($ip == $banzored1 || $ip == $banzored2 || $ip == $banzored3) - Here we're checking the $ip variable (where we stored the persons IP) against a list of banned IPs. If it matches, it echos and will not let them view the site. If it does not match, the user will be allowed to view the site normally.

----

Simple but it works. You can have as many IP's in the $banzored lists as you want. Just remember to assign to the variable and check it in our if statement.

Maybe some more stuff from me coming soon. Will see how popular this is !! See ya
Back to top Go down
View user profile http://red-eyes.top-me.com
 
Basic IP Ban script
Back to top 
Page 1 of 1
 Similar topics
-
» What are the basic requirements for using Selenium IDE?
» Getting error when i run selenium script in Eclipse, please help
» how to save a recorded script in IDE? what file extension do we need to use?
» How to using "selenium rest web services" can any body provide sample script
» New neuro and script for daily HA SPRIX Nasal Spray

Permissions in this forum:You cannot reply to topics in this forum
-=[ rgdh ]=--=[ GrOuP]=- ::  Programming  :: HTML-
Jump to: