darkcarnival Posted November 29, 2006 Share Posted November 29, 2006 i wish to add such a feature to my board, but I am unsure on how to do such a thing.if someone could give me some pointers on this, It'll really be helping me out Smilethanks. Quote Link to comment Share on other sites More sharing options...
obsidian Posted November 29, 2006 Share Posted November 29, 2006 If I'm understanding your question correctly, here is my initial thoughts on the matter: set up a table that simply holds blacklisted IP addresses. Then, when someone logs in, run a simple, quick query to check them against the blacklist before you let them in:[code]<?php$ip = $_SERVER['REMOTE_ADDR'];$sql = mysql_query("SELECT * FROM blacklist WHERE ip = '$ip'");if (mysql_num_rows($sql) > 0) { // blacklisted IP, don't let them in} else { // valid, let them in}?>[/code]Is this the idea of what you're after? Quote Link to comment Share on other sites More sharing options...
darkcarnival Posted November 29, 2006 Author Share Posted November 29, 2006 no but thanks for the try.on phpbb3 is a way to cehck ips from databases from spamcopheres the entrie quote from phpbb's cp:[quote]Check IP against DNS Blackhole List:If enabled the IP is checked against the following DNSBL services on registration and posting: spamcop.net, dsbl.org and spamhaus.org. This lookup may take a bit, depending on the servers configuration. If slowdowns are experienced or too much false positives reported it is recommended to disable this check.[/quote]now i wish to do the same but since phpbb has an odd way of coding, i dont understand how do it. Quote Link to comment Share on other sites More sharing options...
obsidian Posted November 30, 2006 Share Posted November 30, 2006 [quote author=darkcarnival link=topic=116746.msg475911#msg475911 date=1164836573]no but thanks for the try....now i wish to do the same but since phpbb has an odd way of coding, i dont understand how do it.[/quote]I see what you're after. Well, each one of the Black Lists provided has their own way of checking. You need to actually do a little digging on those sites you wish to use and access their information directly. For instance, I spent about 3 minutes browsing the SpamCop site, and I came up with [url=http://www.spamcop.net/fom-serve/cache/351.html]this page[/url] that describes how you can check an IP address against their black list. It's a very similar function to use DSBL according to [url=http://dsbl.org/usage]this page of their site[/url], too. Using these tools they provided, you can configure your server to run those tests for you, and you should be set to go. Quote Link to comment Share on other sites More sharing options...
darkcarnival Posted December 1, 2006 Author Share Posted December 1, 2006 oh ok.thank you for telling me this. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.