Integrate our license verification system into your applications using the following methods:
For PHP applications, create a license_verifier.php file:
<?php
class LicenseVerifier {
private $apiUrl = 'https://lc.evxotechnologies.com/dev/api/verify_license.php';
private $licenseKey;
public function __construct($licenseKey) {
$this->licenseKey = $licenseKey;
}
public function verify() {
$data = [
'license_key' => $this->licenseKey,
'domain' => $_SERVER['HTTP_HOST'] ?? null,
'ip_address' => $_SERVER['REMOTE_ADDR'] ?? null
];
$options = [
'http' => [
'header' => "Content-type: application/json\r\n",
'method' => 'POST',
'content' => json_encode($data)
]
];
$context = stream_context_create($options);
$result = file_get_contents($this->apiUrl, false, $context);
if ($result === FALSE) {
throw new Exception('Failed to connect to license server');
}
return json_decode($result, true);
}
}
?>
For JavaScript applications, create a licenseVerifier.js file:
class LicenseVerifier {
constructor(licenseKey) {
this.apiUrl = 'https://lc.evxotechnologies.com/dev/api/verify_license.php';
this.licenseKey = licenseKey;
}
async verify() {
try {
const response = await fetch(this.apiUrl, {
method: 'POST',
headers: {
'Content-Type': 'application/json'
},
body: JSON.stringify({
license_key: this.licenseKey,
domain: window.location.hostname,
ip_address: ''
})
});
if (!response.ok) {
throw new Error('Network response was not ok');
}
return await response.json();
} catch (error) {
console.error('License verification error:', error);
throw error;
}
}
}