Integration Guide
Step-by-step guide to integrate Killbot into your application.

Introduction

With this integration guide, we’ve made it as easy as possible to quickly get up and running with an end-to-end embedded Killbot integration. Please see our Shortlink feature if you're only looking to create unique links to share with your customers.
In this guide, you will:
We recommend reading our Flow Overview for a look at key concepts and a diagram of an end-to-end integration. Integration for other technologies is still in development, but you can integrate them using our REST API.
Killbot blocker has several setting parameters and terms that you need to know as below, please click the link for more information:
  1. 1.
    Bot Type
  2. 2.
  3. 4.
    Firewall

Integrate Killbot Blocker

In this installation guide, you will install Killbot Blocker in or using:

PHP Web Base Application

  • Upload the /killbot/ folder to the website and put writable permissions on the /killbot/logs/ folder.
  • Change the /killbot/config.php config for yourself (change the active status, API key, and bot or threats users redirection page). Register to get 3 days free trial period to test the cloud version. Below are the contents of the config.php file that you need to configure.
1
<?php
2
3
$CONFIG_KILLBOT = [
4
'active' => true, // If 'true' will set blocker protection active, and 'false' will deactive protection
5
'apikey' => 'YOUR_APIKEY', // Your API Key from https://killbot.org/developer
6
'bot_redirect' => '404' // Bot will be redirect to this URL or you can change with 403, 404, suspend or cloudflare.
7
];
Copied!
  • You can activate and deactivate the protection by setting the parameter 'active'. You need to enter your API Key which was obtained from the Killbot Developer page in the 'apikey' parameter. Then you can set the page or URL that malicious visitors will access in the 'bot_redirection' parameter. The redirection bot variations you can choose from are as follows:
bot_redirection
description
403
Will show 403 Forbidden page.
404
Will show 404 Not Found page.
suspend
Will show suspend page.
cloudflare
Will show fake CloudFlare error page.
{URL}
Will redirect malicious visitors to a specific URL for example you can set to https://google.com.
  • To the beginning of PHP scripts that need to be protected or to some general script (for example: config.php, function.php, etc.) after <?php add: require_once($_SERVER['DOCUMENT_ROOT'].'/killbot/code/include.php'); For example, we use a simple website using PHP which can be downloaded at https://github.com/banago/simple-php-website, in this example there is a config file located at /includes/config.php
  • So that the implementation example will be as below:
1
<?php
2
3
/**
4
* Used to store website configuration information.
5
*
6
* @var string or null
7
*/
8
9
require_once($_SERVER['DOCUMENT_ROOT'].'/killbot/code/include.php');
10
11
function config($key = '')
12
{
13
$config = [
14
'name' => 'Simple PHP Website',
15
'site_url' => '',
16
'pretty_uri' => false,
17
'nav_menu' => [
18
'' => 'Home',
19
'about-us' => 'About Us',
20
'products' => 'Products',
21
'contact' => 'Contact',
22
],
23
'template_path' => 'template',
24
'content_path' => 'content',
25
'version' => 'v3.1',
26
];
27
28
return isset($config[$key]) ? $config[$key] : null;
29
}
30
Copied!

WordPress

You who use the WordPress platform don't need to be difficult to integrate Killbot with your website. We have released a plugin that can help you.
  • Go to Plugins > Installed Plugins, then click Add New
  • Click Upload Plugin then upload plugin which has been downloaded before. After that click Install Now.
  • After the plugin is installed you still need to activate it, so click the Activate Plugin button.
  • A new menu will appear, namely the Killbot Blocker menu under the Dashboard menu. Click the menu to enter the API Key and make arrangements.
  • You need to enter an API Key which you can get at Killbot Developer page. Then there are several settings that need to be entered, such as the URL address that will be accessed by bot visitors, then the IP whitelist and also the status of the plugin is active or not. After entering the API Key and activating the plugin status, Killbot can be used on your WordPress website.
  • The installation is complete, you can monitor and make additional settings on the Killbot Blocker page.

Using Embedded JavaScript

  • You can install Killbot Blocker on your website by simply pasting the code below between the HTML code </head></head>
1
<script type="text/javascript">
2
const killbot = {
3
apiKey: "YOUR_APIKEY",
4
botRedirection: "REDIRECTION_URL"
5
}
6
</script>
7
<script src="https://files.killbot.org/.cdn-cgi/killbot-security.js"></script>
Copied!
  • The following is an example of its use:
1
<!DOCTYPE html>
2
<html lang="en">
3
<head>
4
<meta charset="UTF-8">
5
<meta name="viewport" content="width=device-width, initial-scale=1.0">
6
<title>Hello world!</title>
7
8
<!-- Killbot Security -->
9
<script type="text/javascript">
10
const killbot = {
11
apiKey: "4OPYxX0xxxxxxxxxxxxxxxx", // Your API Key from https://killbot.org/developer
12
botRedirection: "https://google.com" // Bot will be redirect to this URL
13
}
14
</script>
15
<script src="https://files.killbot.org/.cdn-cgi/killbot-security.js"></script>
16
<!-- End Killbot Security -->
17
</head>
18
<body>
19
<h1>Hello world!</h1>
20
</body>
21
</html>
Copied!
  • The installation is complete, you can monitor and make additional settings on the Killbot Blocker page.

Manage Killbot Blocker

  • The following is information about the forms in the Killbot Blocker feature which can be used to manage Blocker:
Form
Description
Device
Choose any device that can enter the destination domain.
Blocked Type
Choose any visitors who are allowed to enter the destination domain. The rest can be read on the Blocked Type page.
Blocked Level
Select the security level to keep out bad users. The rest can be read on the Blocked Level page.
Country
Which countries can access the designated domain. You can customize it via the Customize Bot Redirection page.
Firewall
Select ON to activate WAF. The rest can be read on the Firewall page.
Last modified 10mo ago