Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

PHP Forum


You are currently viewing our PHP Forum as a guest. Please register to participate.
Login



Freelance Jobs

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
Webmaster Talker

Posts: 611
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
 
 
Register now for full access!
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
Webmaster Talker

Posts: 744
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.
__________________
34343639363436653237373432303635373837303635363337 34323037343638363137343263323036343639363432303739 366637353366
lizciz is offline
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: 115
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:
Please login or register to view this content. Registration is FREE

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: 335
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
__________________

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
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
Webmaster Talker

Posts: 744
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
__________________
34343639363436653237373432303635373837303635363337 34323037343638363137343263323036343639363432303739 366637353366
lizciz is offline
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: 4
Name: Antonis
Location: Greece , Athens
Trades: 0
And what about the users who surfing through a proxy?
__________________

Please login or register to view this content. Registration is FREE
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
Webmaster Talker

Posts: 611
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: 80
Name: John
Location: Sacramento
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.51284 seconds with 12 queries