SmartLink Rotator v1.0 - Documentation

Thank you for purchasing SmartLink Rotator. This script allows you to distribute traffic based on country, device, and weight using either a flat-file database (JSON) or MySQL.

1. Server Requirements

2. Installation

  1. Unzip the file and upload the contents to your server (root or subfolder).
  2. Set file permissions to 777 (Writable) for:
    • /data/ folder
    • /core/ folder
    • The root folder (temporarily, to create install.lock)
  3. Visit your URL: www.yourdomain.com/install/
  4. Follow the on-screen wizard. You can choose between JSON (No Database required) or MySQL.
  5. Once installed, the installer will lock itself for security.
Security Tip: After installation, delete the /install/ folder from your server.

3. Geo-Targeting Configuration

The script automatically detects countries using server headers (Cloudflare, etc.). If your server does not provide these headers, the script includes a smart API fallback.

To target a specific country in the admin panel, use 2-letter ISO codes (e.g., US, GB, CA, PK, IN).

4. Features Overview

Weight System

You can set a weight for each link (1-100). A link with weight 10 will be shown 10x more often than a link with weight 1.

Device Targeting

Type mobile, tablet, or desktop in the device field to restrict traffic to specific devices.

5. Troubleshooting

Charts showing "XX" for Country

This means your server environment is not passing Geo-Headers. The script will attempt to use a fallback API. Ensure your server allows outgoing connections (cURL/file_get_contents).

Error 500 / Blank Page

This is usually a permission error. Ensure the /data/ folder has 777 permissions so the script can write logs.