COAD LICENSE SERVER SETUP
=========================

1) Create a MySQL database and import schema.sql.
2) Put validate.php on an HTTPS server, for example:
   https://license.yourdomain.com/api/validate.php
3) Generate an RSA key pair:
   openssl genrsa -out private/private_key.pem 2048
   openssl rsa -in private/private_key.pem -pubout -out public_key.pem
4) Keep private/private_key.pem ONLY on the license server. Never publish it.
5) Open the WordPress plugin PHP file and replace:
   const LICENSE_API = 'https://YOUR-LICENSE-SERVER.example.com/api/validate.php';
   with your real HTTPS endpoint.
6) Replace LICENSE_PUBLIC_KEY with the contents of public_key.pem.
7) Configure database environment variables:
   COAD_DB_HOST, COAD_DB_NAME, COAD_DB_USER, COAD_DB_PASS
8) Create licenses in the coad_licenses table. Each product_key is bound to exactly one website.
9) In WordPress: COAD Restrictor > License, enter the Product Key.

IMPORTANT
- Use HTTPS only.
- Do not put the RSA private key in the WordPress plugin.
- The plugin validates the license at activation and then approximately every 24 hours.
- A previously valid license has a 72-hour server-outage grace period.
- If the server returns an explicit invalid/blocked/expired response, the plugin is disabled immediately.
- This system controls only Product Key + Website, as requested.
