zigway
New member
- Sep 21, 2025
- 3
- 0
- 1
T
thanks for sharing and this would help for the projectFrom functions.php:
PHP:<?php function currentUrl($server) { $http = 'http'; if (isset($server['HTTPS'])) { $http = 'https'; } $host = $server['HTTP_HOST']; $requestUri = $server['REQUEST_URI']; return $http . '://' . htmlentities($host) . '/' . htmlentities($requestUri); } function verify_license($license_code, $current_url) { $url = "http://license.codingest.com/api/check_modesy_license_code?license_code=" . $_POST['license_code'] . "&domain=" . $current_url; $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); $response = curl_exec($ch); curl_close($ch); if (empty($response)) { $url = "https://license.codingest.com/api/check_modesy_license_code?license_code=" . $_POST['license_code'] . "&domain=" . $current_url; $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); $response = curl_exec($ch); curl_close($ch); } return json_decode(true); } function update_config_license_code($license_code) { $config = array(); include 'config/config.php'; $config['license_code'] = $license_code; update_config($config); return $config; } function update_config_license($license_code, $purchase_code) { $config = array(); include 'config/config.php'; $config['purchase_code'] = $purchase_code; $config['license_code'] = $license_code; update_config($config); return $config; }