mthosting Posted April 30, 2012 Share Posted April 30, 2012 This was more of a POC for me, but I dont like wasting code. I re-wrote the PHP license check example as an Adobe Flex library for used in Air or Flash projects. If you don't know what AS3 is you probably don't need this. Here is the download link to whmcsLicense.swc AS3 Example import net.mthosting.WhmcsLicense; var test:WhmcsLicense = new WhmcsLicense("WHMCSURL","SecretKey","IP","DOMAIN","DIRECTORY"); var localkey:String = ""; test.check_license(CallBackFunction,"LicenseKey", localkey); public function licCheck():void {//this is the call back function after we have our results. trace(test.results.toString()); } There are a couple of differences between the PHP example and this. The off-line keys are not compatible with each other. This code uses epoch for time comparison. Also, the results are returned as XML and not an associative array. 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.