Find this useful? Enter your email to receive occasional updates for securing PHP code.

Signing you up...

Thank you for signing up!

PHP Decode

<?php <?php if(count(get_included_files())==1)exit("No direct script access allowed");defi..

Decoded Output download

<?php <?php if(count(get_included_files())==1)exit("No direct script access allowed");define("LB_API_DEBUG",false);define("LB_SHOW_UPDATE_PROGRESS",true);define("LB_TEXT_CONNECTION_FAILED",'Server is unavailable at the moment, please try again.');define("LB_TEXT_INVALID_RESPONSE",'Server returned an invalid response, please contact support.');define("LB_TEXT_VERIFIED_RESPONSE",'Verified! Thanks for purchasing.');define("LB_TEXT_PREPARING_MAIN_DOWNLOAD",'Preparing to download main update...');define("LB_TEXT_MAIN_UPDATE_SIZE",'Main Update size:');define("LB_TEXT_DONT_REFRESH",'(Please do not refresh the page).');define("LB_TEXT_DOWNLOADING_MAIN",'Downloading main update...');define("LB_TEXT_UPDATE_PERIOD_EXPIRED",'Your update period has ended or your license is invalid, please contact support.');define("LB_TEXT_UPDATE_PATH_ERROR",'Folder does not have write permission or the update file path could not be resolved, please contact support.');define("LB_TEXT_MAIN_UPDATE_DONE",'Main update files downloaded and extracted.');define("LB_TEXT_UPDATE_EXTRACTION_ERROR",'Update zip extraction failed.');define("LB_TEXT_PREPARING_SQL_DOWNLOAD",'Preparing to download SQL update...');define("LB_TEXT_SQL_UPDATE_SIZE",'SQL Update size:');define("LB_TEXT_DOWNLOADING_SQL",'Downloading SQL update...');define("LB_TEXT_SQL_UPDATE_DONE",'SQL update files downloaded.');define("LB_TEXT_UPDATE_WITH_SQL_IMPORT_FAILED",'Application was successfully updated but automatic SQL importing failed, please import the downloaded SQL file in your database manually.');define("LB_TEXT_UPDATE_WITH_SQL_IMPORT_DONE",'Application was successfully updated and SQL file was automatically imported.');define("LB_TEXT_UPDATE_WITH_SQL_DONE",'Application was successfully updated, please import the downloaded SQL file in your database manually.');define("LB_TEXT_UPDATE_WITHOUT_SQL_DONE",'Application was successfully updated, there were no SQL updates.');if(!LB_API_DEBUG){@ini_set('display_errors',0);}if((@ini_get('max_execution_time')!=='0')&&(@ini_get('max_execution_time'))<600){@ini_set('max_execution_time',600);}@ini_set('memory_limit','256M');class LicenseBoxExternalAPI{private $m0;private $r1;private $t2;private $o3;private $r4;private $j5;private $c6;private $t7;private $d8;private $k9;public function __construct(){$this->$s10='DD8B27BF';$this->$s11='https://lic.linkitgram.com/';$this->$u12='1DDF4AC81D3856B205C0';$this->$j13='english';$this->$x14='v1.0.0';$this->$a15='envato';$this->$u16=90;$this->$k17=realpath(__DIR__);$this->$n18=realpath($this->$k17.'/..');$this->$u19=$this->$k17.'/.lic';}public function check_local_license_exist(){return is_file($this->$u19);}public function get_current_version(){return $this->$x14;}private function call_api($a20,$g21,$e22=null){$i23=curl_init();switch($a20){case "POST":curl_setopt($i23,CURLOPT_POST,1);if($e22)curl_setopt($i23,CURLOPT_POSTFIELDS,$e22);break;case "PUT":curl_setopt($i23,CURLOPT_CUSTOMREQUEST,"PUT");if($e22)curl_setopt($i23,CURLOPT_POSTFIELDS,$e22);break;default:if($e22)$g21=sprintf("%s?%s",$g21,http_build_query($e22));}$b24=getenv('SERVER_NAME')?:$_SERVER['SERVER_NAME']?:getenv('HTTP_HOST')?:$_SERVER['HTTP_HOST'];$p25=(((isset($_SERVER['HTTPS'])&&($_SERVER['HTTPS']=="on"))or(isset($_SERVER['HTTP_X_FORWARDED_PROTO'])and $_SERVER['HTTP_X_FORWARDED_PROTO']==='https'))?'https://':'http://');$t26=$p25.$b24.$_SERVER['REQUEST_URI'];$x27=getenv('SERVER_ADDR')?:$_SERVER['SERVER_ADDR']?:$this->get_ip_from_third_party()?:gethostbyname(gethostname());curl_setopt($i23,CURLOPT_HTTPHEADER,array('Content-Type: application/json','LB-API-KEY: '.$this->$u12,'LB-URL: '.$t26,'LB-IP: '.$x27,'LB-LANG: '.$this->$j13));curl_setopt($i23,CURLOPT_URL,$g21);curl_setopt($i23,CURLOPT_RETURNTRANSFER,true);curl_setopt($i23,CURLOPT_CONNECTTIMEOUT,30);curl_setopt($i23,CURLOPT_TIMEOUT,30);$d28=curl_exec($i23);if(!$d28&&!LB_API_DEBUG){$f29=array('status'=>FALSE,'message'=>LB_TEXT_CONNECTION_FAILED);return json_encode($f29);}$c30=curl_getinfo($i23,CURLINFO_HTTP_CODE);if($c30!=200){if(LB_API_DEBUG){$w31=json_decode($d28,true);$f29=array('status'=>FALSE,'message'=>((!empty($w31['error']))?$w31['error']:$w31['message']));return json_encode($f29);}else{$f29=array('status'=>FALSE,'message'=>LB_TEXT_INVALID_RESPONSE);return json_encode($f29);}}curl_close($i23);return $d28;}public function check_connection(){$u32=$this->call_api('POST',$this->$s11.'api/check_connection_ext');$d33=json_decode($u32,true);return $d33;}public function get_latest_version(){$r34=array("product_id"=>$this->$s10);$u32=$this->call_api('POST',$this->$s11.'api/latest_version',json_encode($r34));$d33=json_decode($u32,true);return $d33;}public function activate_license($i35,$h36,$z37=true){$r34=array("product_id"=>$this->$s10,"license_code"=>$i35,"client_name"=>$h36,"verify_type"=>$this->$a15);$u32=$this->call_api('POST',$this->$s11.'api/activate_license',json_encode($r34));$d33=json_decode($u32,true);if(!empty($z37)){if($d33['status']){$w38=trim($d33['lic_response']);file_put_contents($this->$u19,$w38,LOCK_EX);}else{@chmod($this->$u19,0777);if(is_writeable($this->$u19)){unlink($this->$u19);}}}return $d33;}public function verify_license($d39=false,$i35=false,$h36=false){if(!empty($i35)&&!empty($h36)){$r34=array("product_id"=>$this->$s10,"license_file"=>null,"license_code"=>$i35,"client_name"=>$h36);}else{if(is_file($this->$u19)){$r34=array("product_id"=>$this->$s10,"license_file"=>file_get_contents($this->$u19),"license_code"=>null,"client_name"=>null);}else{$r34=array();}}$v40=array('status'=>TRUE,'message'=>LB_TEXT_VERIFIED_RESPONSE);if($d39&&$this->$u16>0){ob_start();if(session_status()==PHP_SESSION_NONE){session_start();}$q41=(int)$this->$u16;$v42=date('d-m-Y');if(empty($_SESSION["6fa9e41dc6f76ed"])){$_SESSION["6fa9e41dc6f76ed"]='00-00-0000';}if($q41==1){$n43='1 day';}elseif($q41==3){$n43='3 days';}elseif($q41==7){$n43='1 week';}elseif($q41==30){$n43='1 month';}elseif($q41==90){$n43='3 months';}elseif($q41==365){$n43='1 year';}else{$n43=$q41.' days';}if(strtotime($v42)>=strtotime($_SESSION["6fa9e41dc6f76ed"])){$u32=$this->call_api('POST',$this->$s11.'api/verify_license',json_encode($r34));$v40=json_decode($u32,true);if($v40['status']==true){$x44=date('d-m-Y',strtotime($v42.' + '.$n43));$_SESSION["6fa9e41dc6f76ed"]=$x44;}}ob_end_clean();}else{$u32=$this->call_api('POST',$this->$s11.'api/verify_license',json_encode($r34));$v40=json_decode($u32,true);}return $v40;}public function deactivate_license($i35=false,$h36=false){if(!empty($i35)&&!empty($h36)){$r34=array("product_id"=>$this->$s10,"license_file"=>null,"license_code"=>$i35,"client_name"=>$h36);}else{if(is_file($this->$u19)){$r34=array("product_id"=>$this->$s10,"license_file"=>file_get_contents($this->$u19),"license_code"=>null,"client_name"=>null);}else{$r34=array();}}$u32=$this->call_api('POST',$this->$s11.'api/deactivate_license',json_encode($r34));$d33=json_decode($u32,true);if($d33['status']){@chmod($this->$u19,0777);if(is_writeable($this->$u19)){unlink($this->$u19);}}return $d33;}public function check_update(){$r34=array("product_id"=>$this->$s10,"current_version"=>$this->$x14);$u32=$this->call_api('POST',$this->$s11.'api/check_update',json_encode($r34));$d33=json_decode($u32,true);return $d33;}public function download_update($h45,$q41,$c46,$i35=false,$h36=false,$y47=false){if(!empty($i35)&&!empty($h36)){$r34=array("license_file"=>null,"license_code"=>$i35,"client_name"=>$h36);}else{if(is_file($this->$u19)){$r34=array("license_file"=>file_get_contents($this->$u19),"license_code"=>null,"client_name"=>null);}else{$r34=array();}}ob_end_flush();ob_implicit_flush(true);$c46=str_replace(".","_",$c46);ob_start();$p48=$this->$s11."api/get_update_size/main/".$h45;echo LB_TEXT_PREPARING_MAIN_DOWNLOAD."<br>";if(LB_SHOW_UPDATE_PROGRESS){echo '<script>document.getElementById(\'prog\').value = 1;</script>';}ob_flush();echo LB_TEXT_MAIN_UPDATE_SIZE." ".$this->get_remote_filesize($p48)." ".LB_TEXT_DONT_REFRESH."<br>";if(LB_SHOW_UPDATE_PROGRESS){echo '<script>document.getElementById(\'prog\').value = 5;</script>';}ob_flush();$p49='';$i50=curl_init();$g51=$this->$s11."api/download_update/main/".$h45;curl_setopt($i50,CURLOPT_URL,$g51);curl_setopt($i50,CURLOPT_POST,1);curl_setopt($i50,CURLOPT_POSTFIELDS,$r34);$b24=getenv('SERVER_NAME')?:$_SERVER['SERVER_NAME']?:getenv('HTTP_HOST')?:$_SERVER['HTTP_HOST'];$p25=(((isset($_SERVER['HTTPS'])&&($_SERVER['HTTPS']=="on"))or(isset($_SERVER['HTTP_X_FORWARDED_PROTO'])and $_SERVER['HTTP_X_FORWARDED_PROTO']==='https'))?'https://':'http://');$t26=$p25.$b24.$_SERVER['REQUEST_URI'];$x27=getenv('SERVER_ADDR')?:$_SERVER['SERVER_ADDR']?:$this->get_ip_from_third_party()?:gethostbyname(gethostname());curl_setopt($i50,CURLOPT_HTTPHEADER,array('LB-API-KEY: '.$this->$u12,'LB-URL: '.$t26,'LB-IP: '.$x27,'LB-LANG: '.$this->$j13));if(LB_SHOW_UPDATE_PROGRESS){curl_setopt($i50,CURLOPT_PROGRESSFUNCTION,array($this,'progress'));}if(LB_SHOW_UPDATE_PROGRESS){curl_setopt($i50,CURLOPT_NOPROGRESS,false);}curl_setopt($i50,CURLOPT_RETURNTRANSFER,true);curl_setopt($i50,CURLOPT_CONNECTTIMEOUT,30);echo LB_TEXT_DOWNLOADING_MAIN."<br>";if(LB_SHOW_UPDATE_PROGRESS){echo '<script>document.getElementById(\'prog\').value = 10;</script>';}ob_flush();$e22=curl_exec($i50);$c30=curl_getinfo($i50,CURLINFO_HTTP_CODE);if($c30!=200){if($c30==401){curl_close($i50);exit("<br>".LB_TEXT_UPDATE_PERIOD_EXPIRED);}else{curl_close($i50);exit("<br>".LB_TEXT_INVALID_RESPONSE);}}curl_close($i50);$o52=$this->$n18."/update_main_".$c46.".zip";$o53=fopen($o52,"w+");if(!$o53){exit("<br>".LB_TEXT_UPDATE_PATH_ERROR);}fputs($o53,$e22);fclose($o53);if(LB_SHOW_UPDATE_PROGRESS){echo '<script>document.getElementById(\'prog\').value = 65;</script>';}ob_flush();$m54=new ZipArchive;$v40=$m54->open($o52);if($v40===TRUE){$m54->extractTo($this->$n18."/");$m54->close();unlink($o52);echo LB_TEXT_MAIN_UPDATE_DONE."<br><br>";if(LB_SHOW_UPDATE_PROGRESS){echo '<script>document.getElementById(\'prog\').value = 75;</script>';}ob_flush();}else{echo LB_TEXT_UPDATE_EXTRACTION_ERROR."<br><br>";ob_flush();}if($q41==true){$p48=$this->$s11."api/get_update_size/sql/".$h45;echo LB_TEXT_PREPARING_SQL_DOWNLOAD."<br>";ob_flush();echo LB_TEXT_SQL_UPDATE_SIZE." ".$this->get_remote_filesize($p48)." ".LB_TEXT_DONT_REFRESH."<br>";if(LB_SHOW_UPDATE_PROGRESS){echo '<script>document.getElementById(\'prog\').value = 85;</script>';}ob_flush();$p49='';$i50=curl_init();$g51=$this->$s11."api/download_update/sql/".$h45;curl_setopt($i50,CURLOPT_URL,$g51);curl_setopt($i50,CURLOPT_POST,1);curl_setopt($i50,CURLOPT_POSTFIELDS,$r34);$b24=getenv('SERVER_NAME')?:$_SERVER['SERVER_NAME']?:getenv('HTTP_HOST')?:$_SERVER['HTTP_HOST'];$p25=(((isset($_SERVER['HTTPS'])&&($_SERVER['HTTPS']=="on"))or(isset($_SERVER['HTTP_X_FORWARDED_PROTO'])and $_SERVER['HTTP_X_FORWARDED_PROTO']==='https'))?'https://':'http://');$t26=$p25.$b24.$_SERVER['REQUEST_URI'];$x27=getenv('SERVER_ADDR')?:$_SERVER['SERVER_ADDR']?:$this->get_ip_from_third_party()?:gethostbyname(gethostname());curl_setopt($i50,CURLOPT_HTTPHEADER,array('LB-API-KEY: '.$this->$u12,'LB-URL: '.$t26,'LB-IP: '.$x27,'LB-LANG: '.$this->$j13));curl_setopt($i50,CURLOPT_RETURNTRANSFER,true);curl_setopt($i50,CURLOPT_CONNECTTIMEOUT,30);echo LB_TEXT_DOWNLOADING_SQL."<br>";if(LB_SHOW_UPDATE_PROGRESS){echo '<script>document.getElementById(\'prog\').value = 90;</script>';}ob_flush();$e22=curl_exec($i50);$c30=curl_getinfo($i50,CURLINFO_HTTP_CODE);if($c30!=200){curl_close($i50);exit(LB_TEXT_INVALID_RESPONSE);}curl_close($i50);$o52=$this->$n18."/update_sql_".$c46.".sql";$o53=fopen($o52,"w+");if(!$o53){exit(LB_TEXT_UPDATE_PATH_ERROR);}fputs($o53,$e22);fclose($o53);echo LB_TEXT_SQL_UPDATE_DONE."<br><br>";if(LB_SHOW_UPDATE_PROGRESS){echo '<script>document.getElementById(\'prog\').value = 95;</script>';}ob_flush();if(is_array($y47)){if(!empty($y47["db_host"])&&!empty($y47["db_user"])&&!empty($y47["db_name"])){$r55=strip_tags(trim((string)$y47["db_host"]));$a56=strip_tags(trim((string)$y47["db_user"]));$k57=strip_tags(trim((string)$y47["db_pass"]));$r58=strip_tags(trim((string)$y47["db_name"]));$n59=@mysqli_connect($r55,$a56,$k57,$r58);if(mysqli_connect_errno()){echo LB_TEXT_UPDATE_WITH_SQL_IMPORT_FAILED;}else{$e60='';$k61=file($o52);foreach($k61 as $k62){if(substr($k62,0,2)=='--'||$k62=='')continue;$e60.=$k62;$d63=false;if(substr(trim($k62),-1,1)==';'){$d63=mysqli_query($n59,$e60);$e60='';}}@chmod($o52,0777);if(is_writeable($o52)){unlink($o52);}echo LB_TEXT_UPDATE_WITH_SQL_IMPORT_DONE;}}else{echo LB_TEXT_UPDATE_WITH_SQL_IMPORT_FAILED;}}else{echo LB_TEXT_UPDATE_WITH_SQL_DONE;}if(LB_SHOW_UPDATE_PROGRESS){echo '<script>document.getElementById(\'prog\').value = 100;</script>';}ob_flush();}else{if(LB_SHOW_UPDATE_PROGRESS){echo '<script>document.getElementById(\'prog\').value = 100;</script>';}echo LB_TEXT_UPDATE_WITHOUT_SQL_DONE;ob_flush();}ob_end_flush();}private function progress($s64,$g65,$d66,$t67,$d68){static $t69=0;if($g65==0){$s70=0;}else{$s70=round($d66*100/$g65);}if(($s70!=$t69)&&($s70==25)){$t69=$s70;echo '<script>document.getElementById(\'prog\').value = 22.5;</script>';ob_flush();}if(($s70!=$t69)&&($s70==50)){$t69=$s70;echo '<script>document.getElementById(\'prog\').value = 35;</script>';ob_flush();}if(($s70!=$t69)&&($s70==75)){$t69=$s70;echo '<script>document.getElementById(\'prog\').value = 47.5;</script>';ob_flush();}if(($s70!=$t69)&&($s70==100)){$t69=$s70;echo '<script>document.getElementById(\'prog\').value = 60;</script>';ob_flush();}}private function get_ip_from_third_party(){$i23=curl_init();curl_setopt($i23,CURLOPT_URL,"http://ipecho.net/plain");curl_setopt($i23,CURLOPT_HEADER,0);curl_setopt($i23,CURLOPT_RETURNTRANSFER,true);curl_setopt($i23,CURLOPT_CONNECTTIMEOUT,10);curl_setopt($i23,CURLOPT_TIMEOUT,10);$d33=curl_exec($i23);curl_close($i23);return $d33;}private function get_remote_filesize($g21){$i23=curl_init();curl_setopt($i23,CURLOPT_HEADER,TRUE);curl_setopt($i23,CURLOPT_URL,$g21);curl_setopt($i23,CURLOPT_NOBODY,TRUE);$b24=getenv('SERVER_NAME')?:$_SERVER['SERVER_NAME']?:getenv('HTTP_HOST')?:$_SERVER['HTTP_HOST'];$p25=(((isset($_SERVER['HTTPS'])&&($_SERVER['HTTPS']=="on"))or(isset($_SERVER['HTTP_X_FORWARDED_PROTO'])and $_SERVER['HTTP_X_FORWARDED_PROTO']==='https'))?'https://':'http://');$t26=$p25.$b24.$_SERVER['REQUEST_URI'];$x27=getenv('SERVER_ADDR')?:$_SERVER['SERVER_ADDR']?:$this->get_ip_from_third_party()?:gethostbyname(gethostname());curl_setopt($i23,CURLOPT_HTTPHEADER,array('LB-API-KEY: '.$this->$u12,'LB-URL: '.$t26,'LB-IP: '.$x27,'LB-LANG: '.$this->$j13));curl_setopt($i23,CURLOPT_RETURNTRANSFER,true);curl_setopt($i23,CURLOPT_CONNECTTIMEOUT,30);$d28=curl_exec($i23);$l71=curl_getinfo($i23,CURLINFO_CONTENT_LENGTH_DOWNLOAD);if($l71){switch($l71){case $l71<1024:$a72=$l71.' B';break;case $l71<1048576:$a72=round($l71/1024,2).' KB';break;case $l71<1073741824:$a72=round($l71/1048576,2).' MB';break;case $l71<1099511627776:$a72=round($l71/1073741824,2).' GB';break;}return $a72;}}}?>

Did this file decode correctly?

Original Code

<?php <?php if(count(get_included_files())==1)exit("No direct script access allowed");define("LB_API_DEBUG",false);define("LB_SHOW_UPDATE_PROGRESS",true);define("LB_TEXT_CONNECTION_FAILED",'Server is unavailable at the moment, please try again.');define("LB_TEXT_INVALID_RESPONSE",'Server returned an invalid response, please contact support.');define("LB_TEXT_VERIFIED_RESPONSE",'Verified! Thanks for purchasing.');define("LB_TEXT_PREPARING_MAIN_DOWNLOAD",'Preparing to download main update...');define("LB_TEXT_MAIN_UPDATE_SIZE",'Main Update size:');define("LB_TEXT_DONT_REFRESH",'(Please do not refresh the page).');define("LB_TEXT_DOWNLOADING_MAIN",'Downloading main update...');define("LB_TEXT_UPDATE_PERIOD_EXPIRED",'Your update period has ended or your license is invalid, please contact support.');define("LB_TEXT_UPDATE_PATH_ERROR",'Folder does not have write permission or the update file path could not be resolved, please contact support.');define("LB_TEXT_MAIN_UPDATE_DONE",'Main update files downloaded and extracted.');define("LB_TEXT_UPDATE_EXTRACTION_ERROR",'Update zip extraction failed.');define("LB_TEXT_PREPARING_SQL_DOWNLOAD",'Preparing to download SQL update...');define("LB_TEXT_SQL_UPDATE_SIZE",'SQL Update size:');define("LB_TEXT_DOWNLOADING_SQL",'Downloading SQL update...');define("LB_TEXT_SQL_UPDATE_DONE",'SQL update files downloaded.');define("LB_TEXT_UPDATE_WITH_SQL_IMPORT_FAILED",'Application was successfully updated but automatic SQL importing failed, please import the downloaded SQL file in your database manually.');define("LB_TEXT_UPDATE_WITH_SQL_IMPORT_DONE",'Application was successfully updated and SQL file was automatically imported.');define("LB_TEXT_UPDATE_WITH_SQL_DONE",'Application was successfully updated, please import the downloaded SQL file in your database manually.');define("LB_TEXT_UPDATE_WITHOUT_SQL_DONE",'Application was successfully updated, there were no SQL updates.');if(!LB_API_DEBUG){@ini_set('display_errors',0);}if((@ini_get('max_execution_time')!=='0')&&(@ini_get('max_execution_time'))<600){@ini_set('max_execution_time',600);}@ini_set('memory_limit','256M');class LicenseBoxExternalAPI{private $m0;private $r1;private $t2;private $o3;private $r4;private $j5;private $c6;private $t7;private $d8;private $k9;public function __construct(){$this->$s10='DD8B27BF';$this->$s11='https://lic.linkitgram.com/';$this->$u12='1DDF4AC81D3856B205C0';$this->$j13='english';$this->$x14='v1.0.0';$this->$a15='envato';$this->$u16=90;$this->$k17=realpath(__DIR__);$this->$n18=realpath($this->$k17.'/..');$this->$u19=$this->$k17.'/.lic';}public function check_local_license_exist(){return is_file($this->$u19);}public function get_current_version(){return $this->$x14;}private function call_api($a20,$g21,$e22=null){$i23=curl_init();switch($a20){case "POST":curl_setopt($i23,CURLOPT_POST,1);if($e22)curl_setopt($i23,CURLOPT_POSTFIELDS,$e22);break;case "PUT":curl_setopt($i23,CURLOPT_CUSTOMREQUEST,"PUT");if($e22)curl_setopt($i23,CURLOPT_POSTFIELDS,$e22);break;default:if($e22)$g21=sprintf("%s?%s",$g21,http_build_query($e22));}$b24=getenv('SERVER_NAME')?:$_SERVER['SERVER_NAME']?:getenv('HTTP_HOST')?:$_SERVER['HTTP_HOST'];$p25=(((isset($_SERVER['HTTPS'])&&($_SERVER['HTTPS']=="on"))or(isset($_SERVER['HTTP_X_FORWARDED_PROTO'])and $_SERVER['HTTP_X_FORWARDED_PROTO']==='https'))?'https://':'http://');$t26=$p25.$b24.$_SERVER['REQUEST_URI'];$x27=getenv('SERVER_ADDR')?:$_SERVER['SERVER_ADDR']?:$this->get_ip_from_third_party()?:gethostbyname(gethostname());curl_setopt($i23,CURLOPT_HTTPHEADER,array('Content-Type: application/json','LB-API-KEY: '.$this->$u12,'LB-URL: '.$t26,'LB-IP: '.$x27,'LB-LANG: '.$this->$j13));curl_setopt($i23,CURLOPT_URL,$g21);curl_setopt($i23,CURLOPT_RETURNTRANSFER,true);curl_setopt($i23,CURLOPT_CONNECTTIMEOUT,30);curl_setopt($i23,CURLOPT_TIMEOUT,30);$d28=curl_exec($i23);if(!$d28&&!LB_API_DEBUG){$f29=array('status'=>FALSE,'message'=>LB_TEXT_CONNECTION_FAILED);return json_encode($f29);}$c30=curl_getinfo($i23,CURLINFO_HTTP_CODE);if($c30!=200){if(LB_API_DEBUG){$w31=json_decode($d28,true);$f29=array('status'=>FALSE,'message'=>((!empty($w31['error']))?$w31['error']:$w31['message']));return json_encode($f29);}else{$f29=array('status'=>FALSE,'message'=>LB_TEXT_INVALID_RESPONSE);return json_encode($f29);}}curl_close($i23);return $d28;}public function check_connection(){$u32=$this->call_api('POST',$this->$s11.'api/check_connection_ext');$d33=json_decode($u32,true);return $d33;}public function get_latest_version(){$r34=array("product_id"=>$this->$s10);$u32=$this->call_api('POST',$this->$s11.'api/latest_version',json_encode($r34));$d33=json_decode($u32,true);return $d33;}public function activate_license($i35,$h36,$z37=true){$r34=array("product_id"=>$this->$s10,"license_code"=>$i35,"client_name"=>$h36,"verify_type"=>$this->$a15);$u32=$this->call_api('POST',$this->$s11.'api/activate_license',json_encode($r34));$d33=json_decode($u32,true);if(!empty($z37)){if($d33['status']){$w38=trim($d33['lic_response']);file_put_contents($this->$u19,$w38,LOCK_EX);}else{@chmod($this->$u19,0777);if(is_writeable($this->$u19)){unlink($this->$u19);}}}return $d33;}public function verify_license($d39=false,$i35=false,$h36=false){if(!empty($i35)&&!empty($h36)){$r34=array("product_id"=>$this->$s10,"license_file"=>null,"license_code"=>$i35,"client_name"=>$h36);}else{if(is_file($this->$u19)){$r34=array("product_id"=>$this->$s10,"license_file"=>file_get_contents($this->$u19),"license_code"=>null,"client_name"=>null);}else{$r34=array();}}$v40=array('status'=>TRUE,'message'=>LB_TEXT_VERIFIED_RESPONSE);if($d39&&$this->$u16>0){ob_start();if(session_status()==PHP_SESSION_NONE){session_start();}$q41=(int)$this->$u16;$v42=date('d-m-Y');if(empty($_SESSION["6fa9e41dc6f76ed"])){$_SESSION["6fa9e41dc6f76ed"]='00-00-0000';}if($q41==1){$n43='1 day';}elseif($q41==3){$n43='3 days';}elseif($q41==7){$n43='1 week';}elseif($q41==30){$n43='1 month';}elseif($q41==90){$n43='3 months';}elseif($q41==365){$n43='1 year';}else{$n43=$q41.' days';}if(strtotime($v42)>=strtotime($_SESSION["6fa9e41dc6f76ed"])){$u32=$this->call_api('POST',$this->$s11.'api/verify_license',json_encode($r34));$v40=json_decode($u32,true);if($v40['status']==true){$x44=date('d-m-Y',strtotime($v42.' + '.$n43));$_SESSION["6fa9e41dc6f76ed"]=$x44;}}ob_end_clean();}else{$u32=$this->call_api('POST',$this->$s11.'api/verify_license',json_encode($r34));$v40=json_decode($u32,true);}return $v40;}public function deactivate_license($i35=false,$h36=false){if(!empty($i35)&&!empty($h36)){$r34=array("product_id"=>$this->$s10,"license_file"=>null,"license_code"=>$i35,"client_name"=>$h36);}else{if(is_file($this->$u19)){$r34=array("product_id"=>$this->$s10,"license_file"=>file_get_contents($this->$u19),"license_code"=>null,"client_name"=>null);}else{$r34=array();}}$u32=$this->call_api('POST',$this->$s11.'api/deactivate_license',json_encode($r34));$d33=json_decode($u32,true);if($d33['status']){@chmod($this->$u19,0777);if(is_writeable($this->$u19)){unlink($this->$u19);}}return $d33;}public function check_update(){$r34=array("product_id"=>$this->$s10,"current_version"=>$this->$x14);$u32=$this->call_api('POST',$this->$s11.'api/check_update',json_encode($r34));$d33=json_decode($u32,true);return $d33;}public function download_update($h45,$q41,$c46,$i35=false,$h36=false,$y47=false){if(!empty($i35)&&!empty($h36)){$r34=array("license_file"=>null,"license_code"=>$i35,"client_name"=>$h36);}else{if(is_file($this->$u19)){$r34=array("license_file"=>file_get_contents($this->$u19),"license_code"=>null,"client_name"=>null);}else{$r34=array();}}ob_end_flush();ob_implicit_flush(true);$c46=str_replace(".","_",$c46);ob_start();$p48=$this->$s11."api/get_update_size/main/".$h45;echo LB_TEXT_PREPARING_MAIN_DOWNLOAD."<br>";if(LB_SHOW_UPDATE_PROGRESS){echo '<script>document.getElementById(\'prog\').value = 1;</script>';}ob_flush();echo LB_TEXT_MAIN_UPDATE_SIZE." ".$this->get_remote_filesize($p48)." ".LB_TEXT_DONT_REFRESH."<br>";if(LB_SHOW_UPDATE_PROGRESS){echo '<script>document.getElementById(\'prog\').value = 5;</script>';}ob_flush();$p49='';$i50=curl_init();$g51=$this->$s11."api/download_update/main/".$h45;curl_setopt($i50,CURLOPT_URL,$g51);curl_setopt($i50,CURLOPT_POST,1);curl_setopt($i50,CURLOPT_POSTFIELDS,$r34);$b24=getenv('SERVER_NAME')?:$_SERVER['SERVER_NAME']?:getenv('HTTP_HOST')?:$_SERVER['HTTP_HOST'];$p25=(((isset($_SERVER['HTTPS'])&&($_SERVER['HTTPS']=="on"))or(isset($_SERVER['HTTP_X_FORWARDED_PROTO'])and $_SERVER['HTTP_X_FORWARDED_PROTO']==='https'))?'https://':'http://');$t26=$p25.$b24.$_SERVER['REQUEST_URI'];$x27=getenv('SERVER_ADDR')?:$_SERVER['SERVER_ADDR']?:$this->get_ip_from_third_party()?:gethostbyname(gethostname());curl_setopt($i50,CURLOPT_HTTPHEADER,array('LB-API-KEY: '.$this->$u12,'LB-URL: '.$t26,'LB-IP: '.$x27,'LB-LANG: '.$this->$j13));if(LB_SHOW_UPDATE_PROGRESS){curl_setopt($i50,CURLOPT_PROGRESSFUNCTION,array($this,'progress'));}if(LB_SHOW_UPDATE_PROGRESS){curl_setopt($i50,CURLOPT_NOPROGRESS,false);}curl_setopt($i50,CURLOPT_RETURNTRANSFER,true);curl_setopt($i50,CURLOPT_CONNECTTIMEOUT,30);echo LB_TEXT_DOWNLOADING_MAIN."<br>";if(LB_SHOW_UPDATE_PROGRESS){echo '<script>document.getElementById(\'prog\').value = 10;</script>';}ob_flush();$e22=curl_exec($i50);$c30=curl_getinfo($i50,CURLINFO_HTTP_CODE);if($c30!=200){if($c30==401){curl_close($i50);exit("<br>".LB_TEXT_UPDATE_PERIOD_EXPIRED);}else{curl_close($i50);exit("<br>".LB_TEXT_INVALID_RESPONSE);}}curl_close($i50);$o52=$this->$n18."/update_main_".$c46.".zip";$o53=fopen($o52,"w+");if(!$o53){exit("<br>".LB_TEXT_UPDATE_PATH_ERROR);}fputs($o53,$e22);fclose($o53);if(LB_SHOW_UPDATE_PROGRESS){echo '<script>document.getElementById(\'prog\').value = 65;</script>';}ob_flush();$m54=new ZipArchive;$v40=$m54->open($o52);if($v40===TRUE){$m54->extractTo($this->$n18."/");$m54->close();unlink($o52);echo LB_TEXT_MAIN_UPDATE_DONE."<br><br>";if(LB_SHOW_UPDATE_PROGRESS){echo '<script>document.getElementById(\'prog\').value = 75;</script>';}ob_flush();}else{echo LB_TEXT_UPDATE_EXTRACTION_ERROR."<br><br>";ob_flush();}if($q41==true){$p48=$this->$s11."api/get_update_size/sql/".$h45;echo LB_TEXT_PREPARING_SQL_DOWNLOAD."<br>";ob_flush();echo LB_TEXT_SQL_UPDATE_SIZE." ".$this->get_remote_filesize($p48)." ".LB_TEXT_DONT_REFRESH."<br>";if(LB_SHOW_UPDATE_PROGRESS){echo '<script>document.getElementById(\'prog\').value = 85;</script>';}ob_flush();$p49='';$i50=curl_init();$g51=$this->$s11."api/download_update/sql/".$h45;curl_setopt($i50,CURLOPT_URL,$g51);curl_setopt($i50,CURLOPT_POST,1);curl_setopt($i50,CURLOPT_POSTFIELDS,$r34);$b24=getenv('SERVER_NAME')?:$_SERVER['SERVER_NAME']?:getenv('HTTP_HOST')?:$_SERVER['HTTP_HOST'];$p25=(((isset($_SERVER['HTTPS'])&&($_SERVER['HTTPS']=="on"))or(isset($_SERVER['HTTP_X_FORWARDED_PROTO'])and $_SERVER['HTTP_X_FORWARDED_PROTO']==='https'))?'https://':'http://');$t26=$p25.$b24.$_SERVER['REQUEST_URI'];$x27=getenv('SERVER_ADDR')?:$_SERVER['SERVER_ADDR']?:$this->get_ip_from_third_party()?:gethostbyname(gethostname());curl_setopt($i50,CURLOPT_HTTPHEADER,array('LB-API-KEY: '.$this->$u12,'LB-URL: '.$t26,'LB-IP: '.$x27,'LB-LANG: '.$this->$j13));curl_setopt($i50,CURLOPT_RETURNTRANSFER,true);curl_setopt($i50,CURLOPT_CONNECTTIMEOUT,30);echo LB_TEXT_DOWNLOADING_SQL."<br>";if(LB_SHOW_UPDATE_PROGRESS){echo '<script>document.getElementById(\'prog\').value = 90;</script>';}ob_flush();$e22=curl_exec($i50);$c30=curl_getinfo($i50,CURLINFO_HTTP_CODE);if($c30!=200){curl_close($i50);exit(LB_TEXT_INVALID_RESPONSE);}curl_close($i50);$o52=$this->$n18."/update_sql_".$c46.".sql";$o53=fopen($o52,"w+");if(!$o53){exit(LB_TEXT_UPDATE_PATH_ERROR);}fputs($o53,$e22);fclose($o53);echo LB_TEXT_SQL_UPDATE_DONE."<br><br>";if(LB_SHOW_UPDATE_PROGRESS){echo '<script>document.getElementById(\'prog\').value = 95;</script>';}ob_flush();if(is_array($y47)){if(!empty($y47["db_host"])&&!empty($y47["db_user"])&&!empty($y47["db_name"])){$r55=strip_tags(trim((string)$y47["db_host"]));$a56=strip_tags(trim((string)$y47["db_user"]));$k57=strip_tags(trim((string)$y47["db_pass"]));$r58=strip_tags(trim((string)$y47["db_name"]));$n59=@mysqli_connect($r55,$a56,$k57,$r58);if(mysqli_connect_errno()){echo LB_TEXT_UPDATE_WITH_SQL_IMPORT_FAILED;}else{$e60='';$k61=file($o52);foreach($k61 as $k62){if(substr($k62,0,2)=='--'||$k62=='')continue;$e60.=$k62;$d63=false;if(substr(trim($k62),-1,1)==';'){$d63=mysqli_query($n59,$e60);$e60='';}}@chmod($o52,0777);if(is_writeable($o52)){unlink($o52);}echo LB_TEXT_UPDATE_WITH_SQL_IMPORT_DONE;}}else{echo LB_TEXT_UPDATE_WITH_SQL_IMPORT_FAILED;}}else{echo LB_TEXT_UPDATE_WITH_SQL_DONE;}if(LB_SHOW_UPDATE_PROGRESS){echo '<script>document.getElementById(\'prog\').value = 100;</script>';}ob_flush();}else{if(LB_SHOW_UPDATE_PROGRESS){echo '<script>document.getElementById(\'prog\').value = 100;</script>';}echo LB_TEXT_UPDATE_WITHOUT_SQL_DONE;ob_flush();}ob_end_flush();}private function progress($s64,$g65,$d66,$t67,$d68){static $t69=0;if($g65==0){$s70=0;}else{$s70=round($d66*100/$g65);}if(($s70!=$t69)&&($s70==25)){$t69=$s70;echo '<script>document.getElementById(\'prog\').value = 22.5;</script>';ob_flush();}if(($s70!=$t69)&&($s70==50)){$t69=$s70;echo '<script>document.getElementById(\'prog\').value = 35;</script>';ob_flush();}if(($s70!=$t69)&&($s70==75)){$t69=$s70;echo '<script>document.getElementById(\'prog\').value = 47.5;</script>';ob_flush();}if(($s70!=$t69)&&($s70==100)){$t69=$s70;echo '<script>document.getElementById(\'prog\').value = 60;</script>';ob_flush();}}private function get_ip_from_third_party(){$i23=curl_init();curl_setopt($i23,CURLOPT_URL,"http://ipecho.net/plain");curl_setopt($i23,CURLOPT_HEADER,0);curl_setopt($i23,CURLOPT_RETURNTRANSFER,true);curl_setopt($i23,CURLOPT_CONNECTTIMEOUT,10);curl_setopt($i23,CURLOPT_TIMEOUT,10);$d33=curl_exec($i23);curl_close($i23);return $d33;}private function get_remote_filesize($g21){$i23=curl_init();curl_setopt($i23,CURLOPT_HEADER,TRUE);curl_setopt($i23,CURLOPT_URL,$g21);curl_setopt($i23,CURLOPT_NOBODY,TRUE);$b24=getenv('SERVER_NAME')?:$_SERVER['SERVER_NAME']?:getenv('HTTP_HOST')?:$_SERVER['HTTP_HOST'];$p25=(((isset($_SERVER['HTTPS'])&&($_SERVER['HTTPS']=="on"))or(isset($_SERVER['HTTP_X_FORWARDED_PROTO'])and $_SERVER['HTTP_X_FORWARDED_PROTO']==='https'))?'https://':'http://');$t26=$p25.$b24.$_SERVER['REQUEST_URI'];$x27=getenv('SERVER_ADDR')?:$_SERVER['SERVER_ADDR']?:$this->get_ip_from_third_party()?:gethostbyname(gethostname());curl_setopt($i23,CURLOPT_HTTPHEADER,array('LB-API-KEY: '.$this->$u12,'LB-URL: '.$t26,'LB-IP: '.$x27,'LB-LANG: '.$this->$j13));curl_setopt($i23,CURLOPT_RETURNTRANSFER,true);curl_setopt($i23,CURLOPT_CONNECTTIMEOUT,30);$d28=curl_exec($i23);$l71=curl_getinfo($i23,CURLINFO_CONTENT_LENGTH_DOWNLOAD);if($l71){switch($l71){case $l71<1024:$a72=$l71.' B';break;case $l71<1048576:$a72=round($l71/1024,2).' KB';break;case $l71<1073741824:$a72=round($l71/1048576,2).' MB';break;case $l71<1099511627776:$a72=round($l71/1073741824,2).' GB';break;}return $a72;}}}?>

Function Calls

None

Variables

None

Stats

MD5 04124eee79b16b6f25b9e09496c6f934
Eval Count 0
Decode Time 61 ms