Miscellaneous ⇒ Search Engines :: Archives ⇒ Adding Bots to cpg_members.php - Expectations? :: Archived ⇒ Community Forums ⇒ CPG Dragonfly™ CMS
Forum IndexSearch Engines

Archived ⇒ Adding Bots to cpg_members.php - Expectations?


Hi,

Just wondering if I have done this right. I added the following line to my cpg_members.php file:
} elseif ($bot >= -810834650 && $bot <= -1) { define('SEARCHBOT', 'Amazon');

Basically it is an amazon bot from the IP 207.171.165.38.

My question is, when will the who is where block start showing it as a Bot and not a Visitor?

Thanks,

convict

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
FreeBSD 4.9/MySQL 4.1.11/PHP Version 4.4.8/DragonFly 9.2.1


Since you're talking about one ip use:

} elseif ($bot == -810834650) {

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
Fedora 25 / Apache 2.4.27 / MariaDB 10.1.26 / PHP 7.1.10 / Mercurial


Ahh. thanks DJ.....And would this change appear real time once it is uploaded?

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
FreeBSD 4.9/MySQL 4.1.11/PHP Version 4.4.8/DragonFly 9.2.1


Ahhh Nevermind....it is a live change. Thanks again DJ!

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
FreeBSD 4.9/MySQL 4.1.11/PHP Version 4.4.8/DragonFly 9.2.1


What is the If Bot #? Is that a unix conversion of an ip. How would I figure out how to add an Inktomi bot from 72.30.0.0 - 72.30.255.255? I'm sure Inktomi has been addressed in cvs but I'd like to get it into my 9.0.6.1 sites.

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
Linux/1.3.33/4.4/4.3.11


It's done with a function called ip2long, use this site for conversions,
www.allredroster.com/iptodec.htm

btw, Inktomi is addressed from line 214, so make your adjustments in that block.

DonationsPro for DragonflyCMS & SMF

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):


Thank you.

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
Linux/1.3.33/4.4/4.3.11


I really would like to do this. Under which section of the CPG_memer.php file do I place the above text?

Thanks

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
Ubuntu Linux 8.04.1/Apache 2.28/MySQL 5.0.51/ PHP 5/DF 9.2.x


Phoenix wrote
It's done with a function called ip2long, use this site for conversions,
www.allredroster.com/iptodec.htm


Sorry, don't get it.
Above 207.171.165.38 > -810834650
But Binary to decimal is 3484132646 (acording to www.allredroster.com/iptodec.htm)

So my questions:
1. How to get 207.171.165.38 to -810834650
2. If I want to add a bot to "Bots:" in block "who where", do I add it in includes\classes\CPG_memer.php file or in the database (maybe cms_security?)

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
xp/2.0.59/5.0.27/5.2.0/9.1.1


Because it wasn't clear to me, and because, you know, it never hurts to be overly helpful.

If you haven't upgraded yet and are on an old version...

To update Yahoo / Inktomi
For 9.0.6.x
in /includes/classes/cpg_member.php

I added the following 2 lines after line 217.

($bot >= 1209970945 && $bot <= 1209983743) || ($bot >= 1241911553 && $bot <= 1241929727) ||

So the section now looks like this:

<?php ($bot >= 1150205952 && $bot <= 1150222335) || ($bot >= 1209970945 && $bot <= 1209983743) || ($bot >= 1241911553 && $bot <= 1241929727) || ($bot >= -779935744 && $bot <= -779927808)) { define('SEARCHBOT', 'Inktomi/Yahoo!'); / ?>

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
Unix / 2.0.46 (Red Hat) / 0.9.7a / 4.1.9-standard / 4.3.2 / 9.0.6.1

All times are UTC