1 (edited by Programming-Designs 2005-11-26 01:30)

Topic: BotDetect MOD Release v1.0

##
##
##       Mod title:  BotDetect
##
##       Mod version:  1.0
##       Works on PunBB:  1.2.*
##       Release date:  2005-11-25
##       Author:  Daniel Moxon (services@programming-designs.com)
##       Website: http://programming-designs.com
##
##       Description:  This Mod allows you to detect when a bot is online.
##
##       Affected files:  index.php
##
##
##       Affects DB:  No
##
##
##       Notes: May write this mod to create a table in the DB and be
##                 modified as a plugin, but at the moment this should
##                 suffice. Next version of this mod should focus on that.
##
##       DISCLAIMER:  Please note that "mods" are not officially supported by
##                    PunBB. Installation of this modification is done at your
##                    own risk. Backup your forum database and any and all
##                    applicable files before proceeding.
##
##
##

Download the file here.

Testing this mod: Visit this page and type in the URL to your forums and press submit. This will "spoof" the googlebot user agent and should be visible on your forums.

2 (edited by IdleFire 2005-11-26 01:20)

Re: BotDetect MOD Release v1.0

Thanks a ton, I'll test this out now.

edit: Seems to work, but if being used along with the Online Today mod, the  final } has to be removed from:

    include('botdetect.php');
    $botStatus = isBotOnline(5);

    if ($num_users > 0 || $botStatus != '') {
       echo "\t\t\t".'<dl id="onlinelist" class= "clearb">'."\n\t\t\t\t".'<dt><strong>'.$lang_index['Online'].': </strong></dt>'."\t\t\t\t".implode(',</dd> ', $users);
    if($botStatus != '' & $num_users == 0)
        echo substr($botStatus, 1);
    else
        echo $botStatus;    

    echo '</dd>'."\n\t\t\t".'</dl>'."\n";
    }
        echo "\t\t\t".'<div class="clearer"></div>'."\n";

}

And the word else must be removed from the beginning of the bit for the Online Today mod (otherwise you have two conflicting else statements).

Re: BotDetect MOD Release v1.0

IdleFire, I may write the botdetect mod update sooner than expected. I just made myself a mod to count signup referrals from members on the forums using mysql and will be posting that soon, then I'll work on the botdetect mod smile

4

Re: BotDetect MOD Release v1.0

Added this mod, and there are many bots on my board, but they don't seem to appear in the "Who's online" section.

Did I do something wrong?

Re: BotDetect MOD Release v1.0

Provide me with the url to your forums and I can see if it works or not for myself. If it doesn't I can help you further.

6

Re: BotDetect MOD Release v1.0

imperialdub[dot]com/dubmessages

Re: BotDetect MOD Release v1.0

Very weird, you must have done something wrong... Are you sure you modified the index.php correctly? Did you make sure to include the two files into your /forums root folder? Maybe there isn't write permission in that folder?

8

Re: BotDetect MOD Release v1.0

Yes, i did the mod correctly, but i've sussed it out: fopen()

Not allowed on my server. Any chance you could rewrite or post a workaround using curl?

bummer.

9 (edited by Programming-Designs 2005-11-28 08:14)

Re: BotDetect MOD Release v1.0

Until I write the update that works directly with the punbb sql database I think your out of luck. Perhaps I could set up a script that you can include on your website until then? If so, would be nice if you could tell ppl about my site on your forums big_smile

10

Re: BotDetect MOD Release v1.0

I'd be glad to referr. I have a design site where I get requests for work i either can't or wouldn't do all the time, so referrals are likely.

We have a good 10 - 20 bots on the board all the time, and it would be very nice to see who's who for real.

11

Re: BotDetect MOD Release v1.0

I have all done ... but nothing happens smile

12 (edited by Programming-Designs 2005-11-28 22:28)

Re: BotDetect MOD Release v1.0

^ Did you try testing out the googlebot spoofer? For the URL you may need to put /index.php for it to successfully crawl. What forums do you have it on? URL?

Ps. dss, do you have msn/yahoo/aim messenger? Please email me at services@programming-designs.com so we can talk further smile