README.md

XAntibot Blocker (PHP)

This documentation explains how to install and integrate the XAntibot Blocker (PHP) into your project. The main purpose of this script is to manage Device Permission, Search Engine Permission, Social Media Permission, and Bot Permission, ensuring that only valid traffic is allowed.


Requirements

  • PHP (version required by the package)
  • Access to upload PHP files to your web server or hosting account

1. Download Package

Download the package from your developer dashboard or from the distribution archive:

  • Package file: xantibot-blocker.php

If you have an account, download it from your dashboard.


2. Example Folder Structure

Place the xantibot-blocker.php file as shown below. Other PHP files will include it using require.

/public_html
├── pages/                    ← Folder containing your sub-pages
│   ├── files.php             ← Page that loads the blocker
│   └── files2.php            ← Another page that loads the blocker
├── xantibot-blocker.php      ← Main antibot script
├── index.php                 ← Homepage
└── .htaccess                 ← Server configuration (optional)

3. Integration

Add the required require line at the very top of your PHP files before any other code or output.

Examples:

  • index.php
<?php
require __DIR__ . '/xantibot-blocker.php';
// other code...
  • pages/files.php
<?php
require __DIR__ . '/../xantibot-blocker.php';
// other code...
  • pages/files2.php
<?php
require __DIR__ . '/../xantibot-blocker.php';
// other code...

IMPORTANT: Make sure the require statement is placed before any HTML output or HTTP header is sent.


4. Required Configuration

Open xantibot-blocker.php and replace the configuration variables with your actual values.

Example configuration:

<?php
$apiKey = 'xxxxxxxxxxxxxxx';
$redirectBOT = 'https://www.google.com';
$redirectReal = ''; // $redirectReal: set this if you want to redirect real users to a different URL.
// Leave empty if not needed — recommended to keep empty unless you fully understand the logic.
  • Replace $apiKey with your API key.
  • $redirectBOT: URL to redirect blocked bots or unwanted traffic to.
  • $redirectReal: (optional) URL to redirect real users to a different page — only use if you fully understand the behavior.

FAQ

Q: Where do I get my API Key?
A: Your API Key can be obtained from your developer dashboard: XAntibot Developer

Q: Where can I configure bot settings, whitelist/blacklist, and other options?
A: Manage bot detection, whitelist/blacklist, and other settings here: XAntibot IP Antibot Settings


Contact Support

If you need further assistance, contact support via Telegram: t.me/xantibot_official


Notes:

  • Always test the integration in a staging environment before deploying to production.
  • Ensure the require statement is placed before any output so headers and redirects work correctly.
  • Keep your API key secure and do not commit it to public repositories.