Back to Articles
Integrating the CodeStar License Verification API in Your Code
July 14, 2026

Integrating the CodeStar License Verification API in Your Code

Automate License Checks

One of the biggest concerns for developers is code piracy. With CodeStar, you can protect your scripts by checking license keys directly via our REST API. Here is a simple PHP implementation you can copy:


$licenseKey = "YOUR_BUYER_KEY";
$domain = $_SERVER['HTTP_HOST'];

$response = file_get_contents("http://codestar.pk/api/verify-license?code=" . urlencode($licenseKey) . "&domain=" . urlencode($domain));
$result = json_decode($response, true);

if ($result['status'] !== 'active') {
    die("Invalid License Key or Domain Unauthorized.");
}

This simple snippet ensures that the script only functions on registered domains authorized in the buyer's downloads panel.

Weekly Tech & Scripts Digest

Never Miss Trending Scripts & 20% Weekend Deals

Join 10,000+ developers & entrepreneurs. Get curated top-selling source codes, free dev utilities, and exclusive subscriber promo codes delivered to your inbox every week.