# 🛡️ Advance Bot Spy v12.6 - Professional Edition

## Complete Click Fraud Protection & Bot Blocking System

---

## 📋 WHAT IS THIS?

Advance Bot Spy v12.6 is a professional-grade PHP application that protects your landing pages from:
- ✅ Fake bot clicks on Facebook/Google ads
- ✅ Traffic from unwanted countries
- ✅ Click fraud and automated scripts
- ✅ Crawlers, scrapers, and headless browsers
- ✅ VPN/Proxy traffic
- ✅ Suspicious visitors

**Result:** Save thousands on wasted ad spend and only pay for real customers!

---

## ✨ KEY FEATURES

### 🤖 Bot Detection
- Advanced user-agent pattern matching
- HTTP header validation
- JavaScript execution verification
- Headless browser detection (Selenium, Phantom, WebDriver)
- Canvas fingerprinting detection
- Timing attack prevention

### 🌍 Geographic Filtering
- Country-based access control
- 50+ countries available
- Automatic IP geolocation
- Dual API system (ipapi.co + ip-api.com)
- 24-hour IP caching (reduces API calls by 90%)

### 🔒 Security Features
- SQL injection prevention
- XSS protection
- CSRF protection
- Brute force protection (rate limiting)
- Session hijacking prevention
- Bcrypt password encryption
- Auto session timeout (30 minutes)

### 📊 SpyMaster Dashboard
- Real-time statistics
- Activity logging with filters
- Export capabilities
- Cache management
- Customizable block messages
- Password management

### ⚡ Performance
- Minimal server load (<100ms response)
- Smart caching system
- Database optimization
- Automatic cleanup
- Fail-safe mode

---

## 📦 PACKAGE CONTENTS

```
botspy/
├── admin/                  # SpyMaster panel
│   ├── index.php          # Dashboard
│   ├── settings.php       # Settings & configuration
│   ├── logs.php           # Activity logs
│   ├── clear-cache.php    # Cache management
│   ├── billing.php        # Billing information
│   ├── login.php          # Secure login
│   ├── logout.php         # Logout
│   ├── auth-check.php     # Authentication
│   └── nav.php            # Navigation
├── siteguard/             # Protection engine
│   ├── filter.php         # Main filter (standalone version)
│   ├── block-page.php     # Block page template
│   ├── geo-detector.php   # Geolocation API
│   ├── bot-detector.php   # Bot detection
│   ├── logger.php         # Logging system
│   └── helpers.php        # Helper functions
├── assets/
│   └── admin-style.css    # SpyMaster panel styling
├── config.php             # Database configuration
├── install.php            # Auto-installer
├── database.sql           # Database structure
└── .htaccess              # Security rules
```

---

## 🚀 INSTALLATION GUIDE

### STEP 1: UPLOAD FILES

1. Download the complete package
2. Extract the ZIP file
3. Upload the **botspy** folder to your website root via FTP/cPanel
4. Your structure should be:
   ```
   public_html/
   ├── botspy/           ← Upload here
   ├── index.html        ← Your landing page
   └── other files...
   ```

### STEP 2: RUN INSTALLER

1. Open your browser
2. Navigate to: `https://yourdomain.com/botspy/install.php`
3. Follow the 6-step wizard:
   - Requirements check
   - Database connection
   - Create admin account
   - Configure settings
   - Security setup
   - Completion

### STEP 3: INTEGRATE WITH YOUR LANDING PAGE

**If your landing page is HTML (.html):**

1. Rename `index.html` to `index.php`
2. Add this line at the very top of `index.php`:

```php
<?php
require_once($_SERVER['DOCUMENT_ROOT'] . '/botspy/siteguard/filter.php');
?>
<!DOCTYPE html>
<html>
<!-- Rest of your page -->
```

**If your landing page is already PHP (.php):**

Just add this line at the very top:

```php
<?php
require_once($_SERVER['DOCUMENT_ROOT'] . '/botspy/siteguard/filter.php');
// Your existing PHP code...
?>
```

### STEP 4: CONFIGURE SETTINGS

1. Login to admin: `https://yourdomain.com/botspy/SpyMaster/`
2. Go to **Settings**
3. Set your **Redirect URL** (where legitimate users go)
4. Select **Allowed Countries** (checkboxes)
5. Customize **Block Messages** (optional)
6. Save settings

### STEP 5: TEST IT!

1. Visit your landing page from an allowed country
2. You should be redirected to your configured URL
3. Try with VPN from blocked country → Should see block page
4. Check **Logs** in admin to see blocked attempts

---

## ⚙️ CONFIGURATION

### Database Settings (config.php)

```php
define('DB_HOST', 'localhost');
define('DB_USER', 'your_db_user');
define('DB_PASS', 'your_db_password');
define('DB_NAME', 'your_db_name');
define('DB_PREFIX', 'abs_');
```

### SpyMaster Access

- **URL:** `https://yourdomain.com/botspy/SpyMaster/`
- **Username:** Set during installation
- **Password:** Set during installation (can be changed later)

### Country Selection

50+ countries available including:
- United States (US)
- United Kingdom (GB)
- Canada (CA)
- India (IN)
- Australia (AU)
- Germany (DE)
- France (FR)
- And many more...

---

## 📊 HOW IT WORKS

### Flow Diagram:

```
Visitor arrives
     ↓
Filter checks:
 - Is it a bot? → YES → BLOCK → Log
 - Which country? → Not allowed → BLOCK → Log
 - JavaScript enabled? → NO → BLOCK → Log
     ↓
All checks passed
     ↓
Redirect to your page
     ↓
No log entry (allowed)
```

### What Gets Logged:

- ✅ Bots (any country)
- ✅ Blocked countries
- ✅ Failed verifications
- ❌ Allowed traffic (no log)

---

## 🔧 TROUBLESHOOTING

### HTTP 500 Error

**Problem:** Landing page shows HTTP 500 error
**Solution:** Check filter path in your landing page. Use:
```php
require_once($_SERVER['DOCUMENT_ROOT'] . '/botspy/siteguard/filter.php');
```

### Logs Not Showing

**Problem:** No entries in activity logs
**Solution:**
1. Check if logging is enabled (Settings → Enable Activity Logging)
2. Remember: Only blocked traffic creates logs
3. Same IP cached for 24 hours = no duplicate logs
4. Test with VPN or different IP

### Can't Login to Admin

**Problem:** Forgot admin password
**Solution:**
1. Go to phpMyAdmin
2. Select your database
3. Find table: `abs_admin_users`
4. Reset password using bcrypt hash generator
5. Or re-run installer (will reset everything)

### CSS Not Loading

**Problem:** SpyMaster panel has no styling
**Solution:**
1. Check `/botspy/assets/admin-style.css` exists
2. Verify file permissions (644)
3. Clear browser cache

---

## 📱 ADMIN PANEL GUIDE

### Dashboard
- Blocks today/month statistics
- Top blocked country
- Cache hit rate
- Recent activity (last 10 blocks)

### Settings
- **Redirect URL:** Where legitimate users go
- **Allowed Countries:** Multi-select checkboxes
- **Block Messages:** Customize title and text
- **Features:** Enable/disable JS check, logging
- **Password:** Change admin password

### Logs
- View all blocked attempts
- Filter by: Country, Reason, IP, Date
- Pagination (50 per page)
- Export capability
- Clear logs option

### Cache
- View cache statistics
- Clear all cache
- Clear expired only
- See recent cache entries

### Billing
- Subscription status
- Validity date
- Pricing information
- Contact support
- Feature list

---

## 🔐 SECURITY BEST PRACTICES

1. **Change Default Credentials**
   - Change admin password immediately after install
   - Use strong password (12+ characters)

2. **Delete Install File**
   - Delete `/botspy/install.php` after installation
   - Prevents unauthorized reinstallation

3. **Regular Backups**
   - Backup database monthly
   - Export logs for compliance

4. **Monitor Logs**
   - Check logs weekly
   - Watch for patterns
   - Adjust country settings as needed

5. **Update Settings**
   - Review allowed countries quarterly
   - Test block messages
   - Verify redirect URL

---

## 💰 SUBSCRIPTION & BILLING

**Service:** Advance Bot Spy v12.6 - Professional Edition
**Price:** $1,450 / Quarter (Per Unit/Login)
**Billing Cycle:** Quarterly (Every 3 months)

**Contact Billing:**
- Microsoft Teams: services@hidenseek.click
- Email: services@hidenseek.click

**⚠️ IMPORTANT:** Services may be terminated without prior intimation if payment is not received by renewal date.

---

## 🆘 SUPPORT

**Email:** services@hidenseek.click
**Microsoft Teams:** services@hidenseek.click

**Response Time:** Within 24 hours
**Availability:** Monday - Friday, 9 AM - 6 PM EST

---

## 📄 LICENSE

This software is licensed per installation/domain.
One license = One domain/website.

Multiple domains require multiple licenses.

---

## 🎯 QUICK START CHECKLIST

- [ ] Upload botspy folder to website
- [ ] Run installer at `/botspy/install.php`
- [ ] Create admin account
- [ ] Delete installer
- [ ] Add filter to landing page
- [ ] Configure redirect URL
- [ ] Select allowed countries
- [ ] Test with VPN
- [ ] Check logs
- [ ] Bookmark admin panel
- [ ] Change admin password
- [ ] Set calendar reminder for renewal

---

## 📊 SYSTEM REQUIREMENTS

- **PHP:** 7.4 or higher
- **MySQL:** 5.7 or higher
- **Extensions:** mysqli, json
- **Server:** Apache with mod_rewrite
- **Hosting:** Shared/VPS/Dedicated (any)
- **SSL:** Recommended (not required)

---

## ❓ FAQ

**Q: Will this slow down my site?**
A: No. The filter runs in <100ms. Caching reduces it to ~10ms for repeat visitors.

**Q: Can I use this on multiple domains?**
A: Each domain needs a separate license and installation.

**Q: What if the geolocation API goes down?**
A: The system has dual API fallback + fail-safe mode (allows access if both fail).

**Q: How many logs can it store?**
A: Up to 10,000 records. Auto-deletes oldest when limit reached.

**Q: Can I customize the block page?**
A: Yes! Edit title and message in Settings. Advanced users can edit `/botspy/siteguard/block-page.php`

**Q: Does it work with WordPress/Laravel/etc?**
A: Yes! The filter works with any PHP application.

**Q: Will it block Google/Bing crawlers?**
A: No. Only malicious bots are blocked. Search engine crawlers are allowed.

---

## 🎉 YOU'RE ALL SET!

Your Bot Spy system is now protecting your landing page from click fraud and saving you money on wasted ad spend.

**Remember:**
- Check logs weekly
- Monitor blocked traffic
- Adjust settings as needed
- Renew subscription on time

**Need help?** Contact: services@hidenseek.click

---

**Advance Bot Spy v12.6** - Professional Click Fraud Protection
© 2024-2026 | All Rights Reserved
