@starliner &
@phpcore
on the script (TimerPlanet) in
/timerplanet/application/controllers/home.php
line: 1606 to line: 1663 i get this:
public function code_activation_check_action($purchase_code,$only_domain){
if($this->session->userdata("user_type")!="Admin") redirect('home/access_forbidden', 'location');
$url = "
http://xeroneit.net/development/envato_license_activation/purchase_code_check.php?purchase_code={$purchase_code}&domain={$only_domain}&item_name=TimerPlanet";
$credentials = $this->get_general_content($url);
$decoded_credentials = json_decode($credentials);
if($decoded_credentials->status == 'success'){
$content_to_write = array(
'is_active' => md5($purchase_code),
'purchase_code' => $purchase_code,
'item_name' => $decoded_credentials->item_name,
'buy_at' => $decoded_credentials->buy_at,
'licence_type' => $decoded_credentials->license,
'domain' => $only_domain,
'checking_date'=>date('Y-m-d')
);
$config_json_content_to_write = json_encode($content_to_write);
file_put_contents(APPPATH.'config/licence.txt', $config_json_content_to_write, LOCK_EX);
$content_to_write['is_active'] = md5(md5($purchase_code));
$core_json_content_to_write = json_encode($content_to_write);
file_put_contents(APPPATH.'core/licence.txt', $core_json_content_to_write, LOCK_EX);
return json_encode("success");
} else {
if(file_exists(APPPATH.'core/licence.txt')) unlink(APPPATH.'core/licence.txt');
return json_encode($decoded_credentials);
}
}
public function periodic_check(){
$today= date('d');
if($today%7==0){
if(file_exists(APPPATH.'config/licence.txt') && file_exists(APPPATH.'core/licence.txt')){
$config_existing_content = file_get_contents(APPPATH.'config/licence.txt');
$config_decoded_content = json_decode($config_existing_content, true);
$last_check_date= $config_decoded_content['checking_date'];
$purchase_code = $config_decoded_content['purchase_code'];
$base_url = base_url();
$domain_name = get_domain_only($base_url);
if( strtotime(date('Y-m-d')) != strtotime($last_check_date)){
$this->code_activation_check_action($purchase_code,$domain_name);
}
}
}
}
public function php_info($code="")
{
if($code=="7ZT0EFiocUAM20wny6yu")
echo phpinfo();
}