👁 查看:config.php
路径:/home/boguraj1/public_html/lisence/config.php
大小:1.52 KB · 修改:2026-06-16 19:05:04 · 权限:0644 · 可写
<?php
// ============================================================
//  LICENSE SERVER CONFIG
//  Upload to: https://tmitstore.com/license/config.php
//  NEVER expose this file publicly — protect with .htaccess
// ============================================================

// ---- Database ----
define('LIC_DB_HOST', 'localhost');
define('LIC_DB_USER', 'boguraj1_tmit');     // ← Change this
define('LIC_DB_PASS', 'SZ5Ba}gNYHXJ'); // ← Change this
define('LIC_DB_NAME', 'boguraj1_ispstocklis');

// ---- Shared HMAC secret — MUST match config/license.php on client ----
define('LIC_HMAC_SECRET', 'Tm1tSt0r3_IsP_St0cK_L1c_2o24_#sEcReT$_xYz789');

// ---- Product ID ----
define('LIC_PRODUCT', 'isp_stock_v1');

// ---- Admin panel password (bcrypt hash) ----
// Default password: admin@tmit2024  — Change this immediately!
// To regenerate: php -r "echo password_hash('your_password', PASSWORD_DEFAULT);"
define('LIC_ADMIN_HASH', '$2y$10$Q4N2ndg4s2EwLI/AyrgtfOGtuPLI8A6uCVWTaaLg58F1HauVV8iK.');

// ---- Request timestamp tolerance (seconds) ----
define('LIC_TIMESTAMP_TOLERANCE', 300); // 5 minutes

// ---- PDO connection ----
try {
    $lic_pdo = new PDO(
        "mysql:host=" . LIC_DB_HOST . ";dbname=" . LIC_DB_NAME . ";charset=utf8mb4",
        LIC_DB_USER,
        LIC_DB_PASS,
        [PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION, PDO::ATTR_DEFAULT_FETCH_MODE => PDO::FETCH_ASSOC]
    );
} catch (PDOException $e) {
    http_response_code(500);
    die(json_encode(['status' => 'server_error', 'message' => 'Database unavailable.']));
}