Advertisement
Guest User

Untitled

a guest
May 15th, 2012
258
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.85 KB | None | 0 0
  1. <?php
  2. /**
  3. *
  4. * @ This file is created by deZender.Net
  5. * @ deZender (PHP5 Decoder for ionCube Encoder)
  6. *
  7. * @ Version : 1.1.4.0
  8. * @ Author : DeZender
  9. * @ Release on : 30.03.2012
  10. * @ Official site : http://DeZender.Net
  11. *
  12. */
  13.  
  14. class IonoLicenseHandler {
  15. var $home_url_site = 'http://stemp.agriya.in';
  16. var $home_url_port = 80;
  17. var $home_url_iono = '/vasanthi/upload/remote.php';
  18. var $user_defined_string = '3a08f7d2675c';
  19. var $comm_terminate = true;
  20. var $license_terminate = true;
  21. var $product_license_id = 0;
  22. var $product_id = 0;
  23.  
  24. function setErrorTexts($err_text) {
  25. $this->error_text = $err_text;
  26. }
  27.  
  28. function setCFGAppLicenseValues($CFG) {
  29. $this->home_url_site = $CFG['app_license']['home_url_site'];
  30. $this->home_url_port = $CFG['app_license']['home_url_port'];
  31. $this->home_url_iono = $CFG['app_license']['home_url_iono'];
  32. $this->user_defined_string = $CFG['app_license']['user_defined_string'];
  33. $this->product_license_id = $CFG['app_license']['product_license_id'];
  34. $this->product_id = $CFG['app_license']['product_id'];
  35. }
  36.  
  37. function ionLicenseHandler($license_key, $request_type) {
  38. if (!empty( $this->product_id )) {
  39. $key_parts = explode( '-', $license_key );
  40.  
  41. if (( !isset( $key_parts[2] ) || $key_parts[2] != $this->product_id )) {
  42. return $this->error_text['wrong_product'];
  43. }
  44. }
  45.  
  46.  
  47. if (!empty( $this->product_license_id )) {
  48. $key_parts = explode( '-', $license_key );
  49. $product_license_id = array( substr( md5( $this->product_license_id ), 0, 8 ) );
  50.  
  51. if (!in_array( $key_parts[4], $product_license_id )) {
  52. return $this->error_text['wrong_product'];
  53. }
  54. }
  55.  
  56. $host = $_SERVER['HTTP_HOST'];
  57.  
  58. if (strcasecmp( 'www.', substr( $_SERVER['HTTP_HOST'], 0, 4 ) ) == 0) {
  59. $host = substr( $_SERVER['HTTP_HOST'], 4 );
  60. }
  61.  
  62. $request = 'remote=licenses&type=' . $request_type . '&license_key=' . urlencode( base64_encode( $license_key ) );
  63. $request .= '&host_ip=' . urlencode( base64_encode( $_SERVER['SERVER_ADDR'] ) ) . '&host_name=' . urlencode( base64_encode( $host ) );
  64. $request .= '&hash=' . urlencode( base64_encode( md5( $request ) ) );
  65. $request = $this->home_url_site . $this->home_url_iono . '?' . $request;
  66. $ch = curl_init( );
  67. curl_setopt( $ch, CURLOPT_URL, $request );
  68. curl_setopt( $ch, CURLOPT_PORT, $this->home_url_port );
  69. curl_setopt( $ch, CURLOPT_HEADER, false );
  70. curl_setopt( $ch, CURLOPT_RETURNTRANSFER, true );
  71. curl_setopt( $ch, CURLOPT_USERAGENT, 'iono (www.olate.co.uk/iono)' );
  72. $content = curl_exec( $ch );
  73. curl_close( $ch );
  74.  
  75. if (!$content) {
  76. return 'Unable to communicate with Iono';
  77. }
  78.  
  79. $content = explode( '-', $content );
  80. $status = $content[0];
  81. $hash = $content[1];
  82.  
  83. ...........................................
  84. ..............................
  85. ...............
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement