Skip to content
/ phprbl Public

A quick and easy tool written in PHP to keep clients using open proxies away from your site, and so, reducing referrer spam. It's currently so old, you should probably not use it verbatim, but you can use the same techniques in your project.

License

Notifications You must be signed in to change notification settings

sgaduuw/phprbl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PHPrbl

What is it?
In short: a quick and easy tool to keep clients using open proxies away from 
          your site, and so, reducing referrer spam.

How do I use it?
Usage if fairly simple, place the file rbl.php in the document tree of your
website and include the file rbl.php as high as possible in your PHP code:

	require_once('rbl.php');

Try to place this above any other PHP code since PHPrbl generates a HTTP
header, and it doesn't keep an eye on any other headers.

I have used PHPrbl successfully in Mambo (http://www.mamboserver.com) and in 
b2evolution (http://b2evolution.net/). With both packages, the file rbl.php
could be included in the top of the main index.php

Usage of MySQL:
PHPrbl can make use of MySQL for prechecking and referrer blocking based on
keywords, to install the MySQL tables, use the command 
mysql -u [your username] -p [databasename] < install-0.4.sql
or use phpMyAdmin to upload install-0.4.sql.
This installs the MySQL tables used, and adds some of the most referred to
drugs, to be used by the keywords blocking feature.


From version 0.3, PHPrbl supports prechecking of IP addresses. This will only
work with MySQL enabled. Set $mysql_precheck to 1 in rbl.php to enable this 
feature.
When enabled, the client IP address is checked against the database. Previously
blocked IP addresses will now be blocked before a DNS lookup is done. On really
busy servers this might improve performance.

From version 0.4, PHPrbl supports blocking based on keywords that are matched 
against the given referrer string. This feature only works with MySQL enabled.

Upgrading the MySQL structure from version 0.3.1 to version 0.4:
Use the following command: 
mysql -u [your username] -p [databasename] < upgrade-0.3.1_to0.4.sql
or use phpMyAdmin to upload upgrade-0.3.1_to0.4.sql

PHPrbl Admin Area:
Version 0.4 of PHPrbl finally contains some administrative functionality.
To enable the Admin Area, edit the file phprbladmin/config.php and remove the
line that says: "exit("Hehe, you haven't read the README :P");"
Set $enable_admin_area to 1 and change $admin_user and $admin_pass to your liking.
Please, please don't leave the admin user and password on the default, or the SPAM 
gods will spank you. (version 0.4 only supports adding and deleting keywords)

TODO:
* Add whitelisting functionality
* Extend admin pages to manage blocked IP's and whitelisted IP's

About

A quick and easy tool written in PHP to keep clients using open proxies away from your site, and so, reducing referrer spam. It's currently so old, you should probably not use it verbatim, but you can use the same techniques in your project.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages