Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save smallfri/bd0e1e22e4c6f1f62dfd to your computer and use it in GitHub Desktop.
Save smallfri/bd0e1e22e4c6f1f62dfd to your computer and use it in GitHub Desktop.
$url = 'http://www.licenseengine.com/api/v1/retrieve/product_id/email@sample.com';
$username = 'YOUR_LICENSEENGINE_USERNAME';
$password = 'YOUR_LICENSEENGINE_PASSWORD';
$ch = curl_init();
curl_setopt($ch,CURLOPT_URL,$url);
curl_setopt($ch,CURLOPT_RETURNTRANSFER,true);
curl_setopt($ch,CURLOPT_USERPWD,"$username:$password");
curl_setopt($ch,CURLOPT_HTTPAUTH,CURLAUTH_BASIC);
$output = curl_exec($ch);
$info = curl_getinfo($ch);
curl_close($ch);
print_r($output);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment