================================================================================
  e-visa — cPanel Upload Package (Country Restriction Ready)
================================================================================

This folder is READY TO UPLOAD. No Composer, SSH, or terminal commands needed.

WHAT IS INCLUDED
----------------
- Full CodeIgniter application (unchanged except country filter)
- vendor/ folder with GeoIP2 PHP library (pre-installed)
- GeoLite2-Country.mmdb offline database (pre-downloaded)
- Global country filter: only Pakistan (PK) and Afghanistan (AF) allowed

UPLOAD STEPS (cPanel File Manager)
----------------------------------
1. Log in to cPanel → File Manager
2. Go to your website folder (e.g. public_html or where e-visa lives now)
3. BACK UP your current e-visa folder first (rename to e-visa_backup)
4. Upload this entire "e-visa" folder OR upload "e-visa-upload-ready.zip" and Extract
5. Make sure these exist after upload:
     e-visa/vendor/autoload.php
     e-visa/application/third_party/geoip/GeoLite2-Country.mmdb
6. Visit your website — it should work immediately

REQUIREMENTS
------------
- PHP 7.2 or higher (most cPanel servers have PHP 7.4 or 8.x)
- In cPanel → Select PHP Version: use PHP 7.4+ if available

HOW IT WORKS
------------
- Every visitor is checked BEFORE any page loads
- Pakistan (PK) and Afghanistan (AF) → normal website
- All other countries → 403 Forbidden blocked page
- No controller, model, or database runs for blocked visitors

CUSTOM BLOCKED PAGE
-------------------
Edit this file to change the blocked message/design:
  application/views/errors/html/blocked_country.php

CHANGE ALLOWED COUNTRIES
------------------------
Edit: application/config/geoip.php
  'allowed_countries' => ['PK', 'AF'],

DISABLE FILTER TEMPORARILY (for testing)
----------------------------------------
Edit: application/config/geoip.php
  'enabled' => FALSE,

BEHIND CLOUDFLARE OR PROXY
--------------------------
Edit: application/config/geoip.php
Add your proxy IP to trusted_proxies array.

TROUBLESHOOTING
---------------
- Everyone blocked? Check vendor/ and GeoLite2-Country.mmdb uploaded correctly
- PHP error? Set PHP version to 7.4+ in cPanel
- Still issues? Set 'enabled' => FALSE in geoip.php to restore access, then contact support

================================================================================
