Advertisement
Guest User

Untitled

a guest
Apr 14th, 2018
150
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.10 KB | None | 0 0
  1. <?php
  2. /**
  3. *
  4. * @ This file is created by http://DeZender.Net
  5. * @ deZender (PHP5 Decoder for ionCube Encoder)
  6. *
  7. * @ Version : 3.0.8.0
  8. * @ Author : DeZender
  9. * @ Release on : 25.09.2017
  10. * @ Official site : http://DeZender.Net
  11. *
  12. */
  13.  
  14. class Am_LicenseChecker
  15. {
  16. const OK = 'ok';
  17. const CONNECTION_ERROR = 'connection_error';
  18. const LICENSE_EMPTY = 'license_empty';
  19. const LICENSE_NOT_FOUND = 'license_not_found';
  20. const LICENSE_DISABLED = 'license_disabled';
  21. const LICENSE_EXPIRED = 'license_expired';
  22. const LICENSE_SERVER_ERROR = 'license_server_error';
  23. const ACTIVATION_SERVER_ERROR = 'activation_server_error';
  24. const ERROR_INVALID_INPUT = 'invalid_input';
  25. const ERROR_NO_SPARE_ACTIVATIONS = 'no_spare_activations';
  26. const ERROR_NO_ACTIVATION_FOUND = 'no_activation_found';
  27. const ERROR_NO_REACTIVATION_ALLOWED = 'no_reactivation_allowed';
  28. const ERROR_NO_RESPONSE = 'no_response';
  29. const ERROR_OTHER = 'other_error';
  30.  
  31. /** that is how activation cache will be encrypted - CHANGE IT! */
  32. private $_local_encryption_key = '7d68e6698f248f40dc29b92da555cc9fd025a1e9';
  33. public $messages = array(
  34. self::OK => 'License OK',
  35. self::CONNECTION_ERROR => 'Could not connect to licensing server - please try again later',
  36. self::LICENSE_EMPTY => 'Empty or invalid license key submitted',
  37. self::LICENSE_NOT_FOUND => 'License key not found on licensing server',
  38. self::LICENSE_DISABLED => 'License key has been disabled',
  39. self::LICENSE_EXPIRED => 'License key expired',
  40. self::LICENSE_SERVER_ERROR => 'License server is not available - please try again later',
  41. self::ACTIVATION_SERVER_ERROR => 'Activation server error',
  42. self::ERROR_INVALID_INPUT => 'Activation failed: invalid input',
  43. self::ERROR_NO_SPARE_ACTIVATIONS => 'No more activations allowed',
  44. self::ERROR_NO_ACTIVATION_FOUND => 'No activation found for this installation',
  45. self::ERROR_NO_REACTIVATION_ALLOWED => 'Re-activation is not allowed',
  46. self::ERROR_NO_RESPONSE => 'Internal problem on activation server',
  47. self::ERROR_OTHER => 'Error returned from activation server'
  48. );
  49. protected $api_version = 1;
  50. /** @var int last code returned from */
  51. protected $code = self::OK;
  52. /** @var string last error message */
  53. protected $message = null;
  54. /** @var string license key */
  55. protected $key = null;
  56. /** @var string activation url */
  57. protected $url = null;
  58. /** @var int call home every .. days, 0 - disabled */
  59. protected $call_home_days = 2;
  60. /** @var int grace period .. hours, 24 - default. if "call home" failed, allow to continue */
  61. protected $grace_period = 24;
  62. /** @var array request_vars: set of
  63. * 'ip' : 'Server IP' : detected automatically by getServerIp() method
  64. * 'url' : 'Installation URL' : you must override getRootUrl() method to return it
  65. * 'domain' : 'Domain' : detected automatically by getDomain() method
  66. * 'sdomain' : 'Secure Domain (if application can use 2 domains)': override getSdomain() method to return
  67. * 'hardware-id' : Hardware ID - it can be any info on your choice that identifies the installation - override getHardwareId() method to return
  68. * */
  69. protected $request_vars = array( 'domain' );
  70. /** @var array() */
  71. public $openurl_callbacks = array(
  72. array(
  73. 'this',
  74. 'openUrlFsockopen'
  75. ),
  76. array(
  77. 'this',
  78. 'openUrlCurl'
  79. ),
  80. array(
  81. 'this',
  82. 'openUrlFopen'
  83. )
  84. );
  85. /** @var stdclass */
  86. public $license_response = null;
  87. /** @var Am_LicenseChecker_ActivationResponse */
  88. public $activation_response = null;
  89. /** @var array cache */
  90. protected $_request = null;
  91.  
  92. /**
  93. * Constructor
  94. * @param string $key license key value
  95. * @param string $url activation url
  96. * @param string|array $hash verification hash
  97. */
  98. public function __construct($key, $url, $hash = NULL)
  99. {
  100. $this->key = $key;
  101. ..................................................................
  102. .....................................
  103. ................
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement