Scripts
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsWeb Site ManagementScripts

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
Generate data entry and reporting .NET Web apps in minutes, straight from your database. Read our FREE whitepaper “Build Web 2.0 Applications Without Hand-Coding” Download now!
  #1  
Old August 23rd, 2003, 11:59 PM
Sim_Charlie's Avatar
Sim_Charlie Sim_Charlie is offline
Why Me! Why Me!
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2003
Location: The Tiny Red Dot
Posts: 166 Sim_Charlie User rank is Corporal (100 - 500 Reputation Level)Sim_Charlie User rank is Corporal (100 - 500 Reputation Level)Sim_Charlie User rank is Corporal (100 - 500 Reputation Level)Sim_Charlie User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: 4 h 13 m 40 sec
Reputation Power: 6
Block Specific User

Hi

i know websites such as Ebay got this option for their users that is you can add any user to your "block" list, he/she would not be able to post or bid anything related to you until you remove the user off your "block" list.

So does anyone here know how "Block Specific User" work? or is there a script or maybe, a tutorial that i can read up? Thanks

Reply With Quote
  #2  
Old August 24th, 2003, 10:28 AM
drgroove's Avatar
drgroove drgroove is offline
pushing envelopes, not pencils
Dev Shed God 2nd Plane (6000 - 6499 posts)
 
Join Date: Feb 2002
Posts: 6,224 drgroove User rank is First Lieutenant (10000 - 20000 Reputation Level)drgroove User rank is First Lieutenant (10000 - 20000 Reputation Level)drgroove User rank is First Lieutenant (10000 - 20000 Reputation Level)drgroove User rank is First Lieutenant (10000 - 20000 Reputation Level)drgroove User rank is First Lieutenant (10000 - 20000 Reputation Level)drgroove User rank is First Lieutenant (10000 - 20000 Reputation Level)drgroove User rank is First Lieutenant (10000 - 20000 Reputation Level)drgroove User rank is First Lieutenant (10000 - 20000 Reputation Level) 
Time spent in forums: 1 Day 4 h 34 m 57 sec
Reputation Power: 174
I would imagine this is done by IP address. If you can detect the user's IP, you can prevent them from viewing your site by checking each user's IP address when they visit your site.

I found some sample scripts on HotScripts that would accomplish this, using PHP:

http://www.hotscripts.com/PHP/Scrip...ion/User_Based/

However, this is assuming you're using PHP on your site; if not, or if you're not sure what you're using, you might look for a script that uses Perl (which is installed on almost every *nix system).

Hope that helps.
__________________
Give a person code, and they'll hack for a day; Teach them how to code, and they'll hack forever.
Analyze twice; hack once.
The world's first existential ITIL question: If a change is released into production without a ticket to track it,
was it actually released?


About DrGroove: ITIL-Certified IT Process Engineer - Enterprise Application Architect -
Freelance IT Journalist - Devshed Moderator - Funk Bassist Extraordinaire


Reply With Quote
  #3  
Old August 24th, 2003, 10:17 PM
Sim_Charlie's Avatar
Sim_Charlie Sim_Charlie is offline
Why Me! Why Me!
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2003
Location: The Tiny Red Dot
Posts: 166 Sim_Charlie User rank is Corporal (100 - 500 Reputation Level)Sim_Charlie User rank is Corporal (100 - 500 Reputation Level)Sim_Charlie User rank is Corporal (100 - 500 Reputation Level)Sim_Charlie User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: 4 h 13 m 40 sec
Reputation Power: 6
Actually the "Block Specific User" is more like the ignore lists being used in this forum...

Reply With Quote
  #4  
Old August 24th, 2003, 11:35 PM
drgroove's Avatar
drgroove drgroove is offline
pushing envelopes, not pencils
Dev Shed God 2nd Plane (6000 - 6499 posts)
 
Join Date: Feb 2002
Posts: 6,224 drgroove User rank is First Lieutenant (10000 - 20000 Reputation Level)drgroove User rank is First Lieutenant (10000 - 20000 Reputation Level)drgroove User rank is First Lieutenant (10000 - 20000 Reputation Level)drgroove User rank is First Lieutenant (10000 - 20000 Reputation Level)drgroove User rank is First Lieutenant (10000 - 20000 Reputation Level)drgroove User rank is First Lieutenant (10000 - 20000 Reputation Level)drgroove User rank is First Lieutenant (10000 - 20000 Reputation Level)drgroove User rank is First Lieutenant (10000 - 20000 Reputation Level) 
Time spent in forums: 1 Day 4 h 34 m 57 sec
Reputation Power: 174
Quote:
Originally posted by Sim_Charlie
Actually the "Block Specific User" is more like the ignore lists being used in this forum...


Both eBay and the vBulletin forum software rely on the storing of user information in order to accomplish the banning of specific users - and, even then, it is essentially managed by the user's IP address.

Does your site implement a user login system? If so, then 'banning' users should be trivial, as recording their IP and matching this to personal information has already been taken care of... the only thing to implement at that point is restricting their access to the site.

If your site isn't using user login, employing one of the aforementioned scripts could be a time saver.

Reply With Quote
  #5  
Old August 28th, 2003, 06:15 PM
Reactor's Avatar
Reactor Reactor is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2003
Posts: 78 Reactor User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 5
Cool

Here put this in the page you wish to block the user to:

<?

$blockip = array("555.555.55.55");
$x = count($blockip);
for ($y = 0; $y < $x; $y++) {
if ($REMOTE_ADDR == $blockip[$y]) {
echo ("Site Down");
Exit;}
}

?>

Ok here you go,

You have 2 options into doing this. if you have only 1 page to block, just use the code above, if you have 2 do this

copy this code above with your new ip in it. name it something like banned.php than upload to your server. Now any page you want to protect just add this line to the page:

<?php include 'banned.php'; ?>

This will pull that file every time to check their IP. If their ip is not on that list it will just load the page.

echo ("Site Down");

You can put any text you wish by Site Down. So when the script runs and they are blocked it says that message. I find Site Down fitting because they think the site is down and have no clue they have been banned.

Now to save you some headache and time, you will ask "how do I add more than one?"

change it from: $blockip = array("555.555.55.55");

to: $blockip = array("555.555.55.55", "555.555.55.55", "555.555.55.55");

This should help you, i hope so.

Reply With Quote
  #6  
Old May 9th, 2004, 09:37 PM
alex1208 alex1208 is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Apr 2004
Posts: 4 alex1208 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
have a look at the 'im status' site.

Reply With Quote
Reply

Viewing: Dev Shed ForumsWeb Site ManagementScripts > Block Specific User


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 1 hosted by Hostway