MyBB Community Forums

Full Version: Implementing Bot Blackhole.php
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello!

I am trying to implement Bot Blackhole.php to automatically ban some of my more distasteful automated visitors, and I am having some difficulty when it comes to including the necessary bot-check script at the top of pages.

<?php include($_SERVER['DOCUMENT_ROOT'] . "/blackhole/blackhole.php"); ?>

I am trying to include something similar to this into root/global.php, but I am unfamiliar with MyBB and I am uncertain how to do this successfully; or if there is a more appropriate alternative for including the script on every page. Everything I have tried has shown either a blank white page, or an error indicating that it was unable to fetch the desired file (I did not use the snippet quoted directly above to do this... ;D ) If someone would point me in the direction of a more appropriate solution I would be grateful!

Thanks!
I'm sure you can add php into the header file so on load it will load on all pages.
I'm afraid I've tried that.

The template files will not process php, which is why I am seeking functional alternatives.

Thanks for the suggestion, though!
I use a similar blocking script - zbblock: http://www.spambotsecurity.com/zbblock.php

At the top of global.php after the comments, just add:
require_once('full path to php script');

for example:
require_once('/home/www/blackhole/blackhole.php');
@require_once MYBB_ROOT.'/blackhole.php';

What's the matter?

just include it in Global.php file, after the init.php has been included. Make sure that MYBB_ROOT is defined.
The matter is what you have provided seem not to work.......
Even with MyBB_ROOT set, this is of no help here......

BTW Forum is for asking questions, do not know where is your angryness from?