2007-01-5
Dschini Bot Checker Plugin
After playing a bit with the Wordpress Plugin API I thought about developing a plugin which detects the search engine bots that visit my page. And now I am proud to anounce the release of the Dschini Bot Checker Plugin V1.0 for Wordpress. The plugin synchronizes your local bots database with the Dschini BotService via SOAP. So you need at least Wordpress and PHP 5.
1 Comment
-
SOAP is not available with PHP4 but you can use the following modification to make the plug-in PHP4 compatible.
1. Install NuSOAP in your include path or in the same directory as botchecker.php. NuSOAP can be downloaded for SourceForge.
2. Make the following modifications to botchecker.php;
[FIND]
ini_set(”soap.wsdl_cache_enabled”,”0″);[REPLACE]
include(”nusoap.php”);[FIND]
$client = new SoapClient(”http://services.dschini.org/bot.php?WSDL”);[REPLACE]
$soapclient = new SoapClient(”http://services.dschini.org/bot.php?WSDL”, “wsdl”);
$client = $soapclient->getProxy();[FIND]
$client = new SoapClient(”http://services.dschini.org/bot.php?WSDL”);[REPLACE]
$soapclient = new SoapClient(”http://services.dschini.org/bot.php?WSDL”, “wsdl”);
$client = $soapclient->getProxy();3. My version of PHP had trouble with “->” for an array of arrays so I changed it to use basic array notation for named keys.
[FIND]
,$bot->id,$wpdb->escape($bot->description)
,$wpdb->escape($bot->purpose),$wpdb->escape($bot->history),$wpdb->escape($bot->license)
,$wpdb->escape($bot->exclusionuseragent),$wpdb->escape($bot->ownername),$wpdb->escape($bot->ownerurl)
,$wpdb->escape($bot->owneremail),$wpdb->escape($bot->popularity),$wpdb->escape($bot->name)
,$wpdb->escape($bot->detailsurl)[REPLACE]
,$bot['id'],$wpdb->escape($bot['description'])
,$wpdb->escape($bot['purpose']),$wpdb->escape($bot['history']),$wpdb->escape($bot['license'])
,$wpdb->escape($bot['exclusionuseragent']),$wpdb->escape($bot['ownername']),$wpdb->escape($bot['ownerurl'])
,$wpdb->escape($bot['owneremail']),$wpdb->escape($bot['popularity']),$wpdb->escape($bot['name'])
,$wpdb->escape($bot['detailsurl'])4. If you do not have the ability to install NuSOAP in the include path put it someplace where you do have write access and add the following immediately before the ‘include(”nusoap.php”);’.
set_include_path(”.;/wherever/you/put/nusoap/lib”);

