Reply
a cool script i found to ban users by their ip address on your site
Old 11-03-2009, 05:20 PM a cool script i found to ban users by their ip address on your site
Ultra Talker

Posts: 454
Trades: 0
paste this in your document, and put in your different banned ips, separated by commas. it works great!

Code:
<?php
$deny = array("65.40.108.91");
if (in_array ($_SERVER['REMOTE_ADDR'], $deny)) {
   echo("hello there , you have attempted to hack my login page , and have been banned permanently from my website. thank you. derek");
   
    
   exit();
} ?>
i use it on this page http://oddnerdrum.info works great.
silverglade is offline
Reply With Quote
View Public Profile
 
 
When You Register, These Ads Go Away!
Old 11-03-2009, 06:56 PM Re: a cool script i found to ban users by their ip address on your site
lizciz's Avatar
Ultra Talker

Posts: 330
Name: Mattias Nordahl
Location: Sweden
Trades: 0
Just remeber that most (I guess... at least alot of) internet users have dynamic IP addresses, in which case your ban would only last until they get a new one, which could be the next day.
__________________
596f75206d65616e20796f752063616e2061637475616c6c79 207265616420746869733f
lizciz is online now
Reply With Quote
View Public Profile Visit lizciz's homepage!
 
Old 11-03-2009, 06:59 PM Re: a cool script i found to ban users by their ip address on your site
Super Talker

Posts: 109
Name: Not Telling
Trades: 0
Lizciz, since I first saw u post I always wanted to know, what are the numbers in your signature?

If you can post a thread about it, it seems interesting why you have random numbers in your signature.
__________________
MY MSN: Sith717@Hotmail.com
PHP, HTML, and CSS Coding, Logo and Web Design - Professionally done.
PM me anytime for HTML, PHP or web design help. I will be glad to help you out.
sith717 is offline
Reply With Quote
View Public Profile
 
Old 11-03-2009, 09:08 PM Re: a cool script i found to ban users by their ip address on your site
orionoreo's Avatar
Ultra Talker

Posts: 261
Name: Jerry
Trades: 0
Quote:
Originally Posted by sith717 View Post
Lizciz, since I first saw u post I always wanted to know, what are the numbers in your signature?

If you can post a thread about it, it seems interesting why you have random numbers in your signature.

maybe its an md5 of his password and username lol

btw liz is correct... plus most people manage their websites through a database so banned users should be stored a db
orionoreo is offline
Reply With Quote
View Public Profile
 
Old 11-04-2009, 03:21 AM Re: a cool script i found to ban users by their ip address on your site
lizciz's Avatar
Ultra Talker

Posts: 330
Name: Mattias Nordahl
Location: Sweden
Trades: 0
Quote:
Originally Posted by sith717 View Post
Lizciz, since I first saw u post I always wanted to know, what are the numbers in your signature?

If you can post a thread about it, it seems interesting why you have random numbers in your signature.
Telling what it means would spoil the fun of it :P But a small tip: hex
__________________
596f75206d65616e20796f752063616e2061637475616c6c79 207265616420746869733f
lizciz is online now
Reply With Quote
View Public Profile Visit lizciz's homepage!
 
Old 11-04-2009, 03:54 AM Re: a cool script i found to ban users by their ip address on your site
antonisid's Avatar
Junior Talker

Posts: 3
Name: Antonis
Location: Greece , Athens
Trades: 0
And what about the users who surfing through a proxy?
__________________
www.phone24.gr
antonisid is offline
Reply With Quote
View Public Profile Visit antonisid's homepage!
 
Old 11-04-2009, 09:27 AM Re: a cool script i found to ban users by their ip address on your site
Ultra Talker

Posts: 454
Trades: 0
ya my security measure has flaws, but i got some other code that uses the mysql database to hold the ip address and name of person. then i made a script page to ban them by name and ip. but if they are dynamic or behind a proxy, not much i can do. well im sure there is, but its way beyond my skill level.
silverglade is offline
Reply With Quote
View Public Profile
 
Old 11-04-2009, 12:41 PM Re: a cool script i found to ban users by their ip address on your site
Skilled Talker

Posts: 61
Name: John
Trades: 0
It's also worth noting that this would only block those IP's from your scripts; your content (photos/flash/etc) and any directory listings would still be accessible directly.

I've also explored .htaccess entries for a more complete block; however, (as several forum members have shared) this method increases your overall workload given that every request must wade through these additional lines.
Envision_frodo is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to a cool script i found to ban users by their ip address on your site
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML

 



Page generated in 0.13376 seconds with 13 queries