Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $licensekey = get_option('stpopup-license'); //WP Function Like: get_option('stpopup-license');, Joomla! Function Like: $this->params->get('license');, OR $_POST['key'];.
- $prod_code = "13"; //Must same with product id registered stored on DataBase
- $domain = $_SERVER['SERVER_NAME'];
- if (substr($domain, 0, 4) == "www.") { $domain = substr($domain, 4);}
- $domains = $domain;
- $userip = isset($_SERVER['SERVER_ADDR']) ? $_SERVER['SERVER_ADDR'] : $_SERVER['LOCAL_ADDR'];
- $validdir = dirname(__FILE__);
- $website = $domain;
- $validdomain = $domain;
- $key_info['wpls-verify'] = $licensekey;
- $key_info['domain'] = $validdomain;
- $key_info['validip'] = $userip;
- $key_info['validdir'] = $validdir;
- $key_info['product'] = $prod_code;
- $serverurl = "http://z-studio.me/"; // Your Blog URL Where WLS Installed
- $ch = curl_init();
- curl_setopt($ch, CURLOPT_URL, $serverurl);
- curl_setopt($ch, CURLOPT_POST, 1);
- curl_setopt($ch, CURLOPT_POSTFIELDS, $key_info);
- curl_setopt($ch, CURLOPT_TIMEOUT, 30);
- curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
- $result = curl_exec($ch);
- curl_close($ch);
- $result = json_decode($result, true);
- if($result){
- if($result['valid']){
- $status = $result['info']['status'];
- // key is valid so run it
- echo "<p>Your license key <b>";
- echo $licensekey;
- ?>
- </b> is <?php echo $status; ?>.<br>Conratulation You are authorize to use this software</p>
- <?php
- } else {
- // key is not valid so stop it
- echo "'<div class='updated<p>Your license key <b></div>";
- echo $licensekey;
- echo "</b> is invalid.<br>Possible reasons for this include:</p>\r\n<ul>\r\n<li>The license key has been entered incorrectly</li>\r\n<li>The domain being used to access your install has changed</li>\r\n<li>The IP address your install is located on has changed</li>\r\n<li>The directory you are using has changed</li>\r\n</ul>\r\n<p>If required, you can reissue your license from our client area on demand to update the allowed install location.</p>\r\n";
- }
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement