Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /**
- *
- * @ This file is created by deZender.Net
- * @ deZender (PHP5 Decoder for ionCube Encoder)
- *
- * @ Version : 1.1.4.0
- * @ Author : DeZender
- * @ Release on : 30.03.2012
- * @ Official site : http://DeZender.Net
- *
- */
- class IonoLicenseHandler {
- var $home_url_site = 'http://stemp.agriya.in';
- var $home_url_port = 80;
- var $home_url_iono = '/vasanthi/upload/remote.php';
- var $user_defined_string = '3a08f7d2675c';
- var $comm_terminate = true;
- var $license_terminate = true;
- var $product_license_id = 0;
- var $product_id = 0;
- function setErrorTexts($err_text) {
- $this->error_text = $err_text;
- }
- function setCFGAppLicenseValues($CFG) {
- $this->home_url_site = $CFG['app_license']['home_url_site'];
- $this->home_url_port = $CFG['app_license']['home_url_port'];
- $this->home_url_iono = $CFG['app_license']['home_url_iono'];
- $this->user_defined_string = $CFG['app_license']['user_defined_string'];
- $this->product_license_id = $CFG['app_license']['product_license_id'];
- $this->product_id = $CFG['app_license']['product_id'];
- }
- function ionLicenseHandler($license_key, $request_type) {
- if (!empty( $this->product_id )) {
- $key_parts = explode( '-', $license_key );
- if (( !isset( $key_parts[2] ) || $key_parts[2] != $this->product_id )) {
- return $this->error_text['wrong_product'];
- }
- }
- if (!empty( $this->product_license_id )) {
- $key_parts = explode( '-', $license_key );
- $product_license_id = array( substr( md5( $this->product_license_id ), 0, 8 ) );
- if (!in_array( $key_parts[4], $product_license_id )) {
- return $this->error_text['wrong_product'];
- }
- }
- $host = $_SERVER['HTTP_HOST'];
- if (strcasecmp( 'www.', substr( $_SERVER['HTTP_HOST'], 0, 4 ) ) == 0) {
- $host = substr( $_SERVER['HTTP_HOST'], 4 );
- }
- $request = 'remote=licenses&type=' . $request_type . '&license_key=' . urlencode( base64_encode( $license_key ) );
- $request .= '&host_ip=' . urlencode( base64_encode( $_SERVER['SERVER_ADDR'] ) ) . '&host_name=' . urlencode( base64_encode( $host ) );
- $request .= '&hash=' . urlencode( base64_encode( md5( $request ) ) );
- $request = $this->home_url_site . $this->home_url_iono . '?' . $request;
- $ch = curl_init( );
- curl_setopt( $ch, CURLOPT_URL, $request );
- curl_setopt( $ch, CURLOPT_PORT, $this->home_url_port );
- curl_setopt( $ch, CURLOPT_HEADER, false );
- curl_setopt( $ch, CURLOPT_RETURNTRANSFER, true );
- curl_setopt( $ch, CURLOPT_USERAGENT, 'iono (www.olate.co.uk/iono)' );
- $content = curl_exec( $ch );
- curl_close( $ch );
- if (!$content) {
- return 'Unable to communicate with Iono';
- }
- $content = explode( '-', $content );
- $status = $content[0];
- $hash = $content[1];
- ...........................................
- ..............................
- ...............
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement