SPAM, has become one of the biggest problems facing the Internet today. In fact Spam and the attempts to reduce Spam have turned each website form or email into an unreliable Internet tool today.
If you talk to users they don’t see much difference between Spam and the ordinary junk mail that mail carriers have delivered for years. For php Link Directory web directory owners – SPAM appears in the form of submissions filled with junk and useless values typically pushing meaningless URL’s and containing objectionable text and links. While in case of emails hitting the delete button is obvious, however the problem gets complicated with hundreds of Spam link submissions filling up your directory overnight. The cost to you as a directory owner in terms of bandwidth, delayed emails or bulk emails and phpLD web directory performance has become a tremendous problem for anyone who provides web directory services.
Earlier I had introduce a FREE MOD to (delete all SPAM Submissions ) phpLD Bulk Delete SPAM Submissions which is also available in downloads section – if you would like to try it with your web directory)
Today, lets look at our defense mechanism and what can we do to block it at the door itself.
As the title suggests, We are going to look at the strategy of blocking IP address and effectively blocking the spammer to reach our web directory from a particular IP address.
First, open include/functions.php and find the following (around line 114 in pld 2.xx and around line 806 in pld 3.xx):
function get_client_ip() {
if (isset ($_SERVER['HTTP_X_FORWARDED_FOR']))
$ipAddress = $_SERVER['HTTP_X_FORWARDED_FOR'];
else
$ipAddress = $_SERVER['REMOTE_ADDR'];
return $ipAddress;
}Change this to:
function get_client_ip() {
$ipAddress = $_SERVER['REMOTE_ADDR'];
return $ipAddress;
}
Here’s how it works:
X_FORWARDED_FOR can easily be spoofed by using a proxy server and a spoofed IP. By modifying this field and tracking REMOTE_ADDR we would get the actual / proxy IP address. Once we have the IP Address, adding a simple entry in .htaccess to DENY ALL from tracked IP address would ensure that server starts to block any attempts made from the particular offending IP Address. Technically this isn’t an effort to ban the spammer, but to block particular IP addresses that allow spammers to use them to add links to our web directories.
If you have any other view or approach this problem, or would like to suggest any php link directory mod, let us know via comments and we would update this for all our readers on this blog!
To your success,
Pubdomains – Web Hosting, Domain Registration, Human Edited Web Directory, .IN Indian Domain Registrar
————————————————————-
Current Promotions @ Pubdomains – Domain Name SALE – Register .IN Domains
Popularity: 3%
Comments