<commit_before><?php
require_once('cronjob_log.php');
require_once('backup.php');

class cronjob
{
	public function run()
	{
		$dir = __DIR__. '/masterurl.me.txt';
		if(is_file($dir))
		{
			$this->_curl(file_get_contents($dir));
		}

		// $dir = str_replace('dash/lib/engine/cronjob', '', $dir);
		// $dir .= 'cronjob.php';

		// // cronjob_log::save($dir);
		// if(is_file($dir))
		// {
		// 	cronjob_log::save(date("Y-m-d H:i:s"). ' --- Try to php '. $dir. ' ...');
		// 	exec("php $dir");
		// }
	}

	public function _curl($_masterurl)
	{
		$token         = time(). '_<PASSWORD>_'. (string) rand() . (string) rand();
		$token         = md5($token);

		$token_json['token'] = $token;
		$token_json['date']  = date("Y-m-d H:i:s");

		file_put_contents(__DIR__. '/token.me.json', json_encode($token_json, JSON_UNESCAPED_UNICODE | JSON_PRETTY_PRINT));

		if(!function_exists('curl_init'))
		{
			echo "curl_init is not exist!";
			return false;
		}
		$handle   = curl_init();
		curl_setopt($handle, CURLOPT_URL, $_masterurl);
		// curl_setopt($handle, CURLOPT_HTTPHEADER, json_encode($_requests['header'], JSON_UNESCAPED_UNICODE));
		curl_setopt($handle, CURLOPT_RETURNTRANSFER, true);
		curl_setopt($handle, CURLOPT_SSL_VERIFYHOST, false);
		curl_setopt($handle, CURLOPT_SSL_VERIFYPEER, false);
		curl_setopt($handle, CURLOPT_POST, true);

		curl_setopt($handle, CURLOPT_POSTFIELDS, http_build_query($token_json));
		curl_setopt($handle, CURLOPT_CONNECTTIMEOUT, 20);
		curl_setopt($handle, CURLOPT_TIMEOUT, 30);

		if(defined('CURLOPT_IPRESOLVE') && defined('CURL_IPRESOLVE_V4'))
		{
 			curl_setopt($handle, CURLOPT_IPRESOLVE, CURL_IPRESOLVE_V4);
		}

		$response = curl_exec($handle);
		$mycode   = curl_getinfo($handle, CURLINFO_HTTP_CODE);
		curl_close ($handle);
		echo $_masterurl;
		echo '|';
		echo $mycode;
		echo '|';
		var_dump($response);

	}
}

(new cronjob)->run();

(new backup)->run();
?><commit_msg>increase time<commit_after><?php
require_once('cronjob_log.php');
require_once('backup.php');

class cronjob
{
	public function run()
	{
		$dir = __DIR__. '/masterurl.me.txt';
		if(is_file($dir))
		{
			$this->_curl(file_get_contents($dir));
		}

		// $dir = str_replace('dash/lib/engine/cronjob', '', $dir);
		// $dir .= 'cronjob.php';

		// // cronjob_log::save($dir);
		// if(is_file($dir))
		// {
		// 	cronjob_log::save(date("Y-m-d H:i:s"). ' --- Try to php '. $dir. ' ...');
		// 	exec("php $dir");
		// }
	}

	public function _curl($_masterurl)
	{
		$token         = time(). '_Erm<PASSWORD>_cronjob_'. (string) rand() . (string) rand();
		$token         = md5($token);

		$token_json['token'] = $token;
		$token_json['date']  = date("Y-m-d H:i:s");

		file_put_contents(__DIR__. '/token.me.json', json_encode($token_json, JSON_UNESCAPED_UNICODE | JSON_PRETTY_PRINT));

		if(!function_exists('curl_init'))
		{
			echo "curl_init is not exist!";
			return false;
		}
		$handle   = curl_init();
		curl_setopt($handle, CURLOPT_URL, $_masterurl);
		// curl_setopt($handle, CURLOPT_HTTPHEADER, json_encode($_requests['header'], JSON_UNESCAPED_UNICODE));
		curl_setopt($handle, CURLOPT_RETURNTRANSFER, true);
		curl_setopt($handle, CURLOPT_SSL_VERIFYHOST, false);
		curl_setopt($handle, CURLOPT_SSL_VERIFYPEER, false);
		curl_setopt($handle, CURLOPT_POST, true);

		curl_setopt($handle, CURLOPT_POSTFIELDS, http_build_query($token_json));
		curl_setopt($handle, CURLOPT_CONNECTTIMEOUT, 20);
		curl_setopt($handle, CURLOPT_TIMEOUT, 40);

		if(defined('CURLOPT_IPRESOLVE') && defined('CURL_IPRESOLVE_V4'))
		{
 			curl_setopt($handle, CURLOPT_IPRESOLVE, CURL_IPRESOLVE_V4);
		}

		$response = curl_exec($handle);
		$mycode   = curl_getinfo($handle, CURLINFO_HTTP_CODE);
		curl_close ($handle);
		echo $_masterurl;
		echo '|';
		echo $mycode;
		echo '|';
		var_dump($response);

	}
}

(new cronjob)->run();

(new backup)->run();
?>
{'fraction_non_alphanumeric': 0.18673602080624188, 'fraction_numerical': 0.0036410923276983093, 'mean_word_length': 4.525862068965517, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 13, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '495891', 'n_tokens_mistral': 1704, 'n_tokens_neox': 1498, 'n_words': 223}