Advertisement
Guest User

lisensi 2

a guest
Aug 20th, 2018
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.00 KB | None | 0 0
  1. <?php
  2.  
  3. $licensekey = get_option('stpopup-license'); //WP Function Like: get_option('stpopup-license');, Joomla! Function Like: $this->params->get('license');, OR $_POST['key'];.
  4. $prod_code = "13"; //Must same with product id registered stored on DataBase
  5. $domain = $_SERVER['SERVER_NAME'];
  6. if (substr($domain, 0, 4) == "www.") { $domain = substr($domain, 4);}
  7. $domains = $domain;
  8. $userip = isset($_SERVER['SERVER_ADDR']) ? $_SERVER['SERVER_ADDR'] : $_SERVER['LOCAL_ADDR'];
  9. $validdir = dirname(__FILE__);
  10. $website = $domain;
  11. $validdomain = $domain;
  12.  
  13. $key_info['wpls-verify'] = $licensekey;
  14. $key_info['domain'] = $validdomain;
  15. $key_info['validip'] = $userip;
  16. $key_info['validdir'] = $validdir;
  17. $key_info['product'] = $prod_code;
  18.  
  19. $serverurl = "http://z-studio.me/"; // Your Blog URL Where WLS Installed
  20. $ch = curl_init();
  21. curl_setopt($ch, CURLOPT_URL, $serverurl);
  22. curl_setopt($ch, CURLOPT_POST, 1);
  23. curl_setopt($ch, CURLOPT_POSTFIELDS, $key_info);
  24. curl_setopt($ch, CURLOPT_TIMEOUT, 30);
  25. curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
  26. $result = curl_exec($ch);
  27. curl_close($ch);
  28.  
  29. $result = json_decode($result, true);
  30. if($result){
  31. if($result['valid']){
  32. $status = $result['info']['status'];
  33.  
  34. // key is valid so run it
  35. echo "<p>Your license key &nbsp;<b>";
  36. echo $licensekey;
  37. ?>
  38. </b>&nbsp; is <?php echo $status; ?>.<br>Conratulation You are authorize to use this software</p>
  39. <?php
  40. } else {
  41.  
  42. // key is not valid so stop it
  43. echo "'<div class='updated<p>Your license key &nbsp;<b></div>";
  44. echo $licensekey;
  45. echo "</b>&nbsp;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";
  46.  
  47. }
  48. }
  49.  
  50. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement