<commit_before><?php
	$log = '../traffic.log';
	
	date_default_timezone_set("Europe/Bucharest");
	$time = date("d-m-y h:i:sa");
	
	if (!empty($_SERVER['HTTP_CLIENT_IP'])) {
		$ip = $_SERVER['HTTP_CLIENT_IP'];
	} elseif (!empty($_SERVER['HTTP_X_FORWARDED_FOR'])) {
		$ip = $_SERVER['HTTP_X_FORWARDED_FOR'];
	} else {
		$ip = $_SERVER['REMOTE_ADDR'];
	}
	
	$details = file_get_contents("http://ipinfo.io/" . $ip . "/json");
	$details = rtrim($details, "\0");
	$details = stripslashes(html_entity_decode($details));
	$details = json_decode($details, true);
	$location = $details["country"] . "/" . $details["region"] . "/" . $details["city"];
	
	$url = $_SERVER['HTTP_HOST'].$_SERVER['PHP_SELF'];
	
	$text = $time . " " . $ip . " " . $location . " " . $url . "\n";
	file_put_contents($log, $text, FILE_APPEND);
?><commit_msg>Update index.php<commit_after>
{'fraction_non_alphanumeric': 0.23708920187793428, 'fraction_numerical': 0.0011737089201877935, 'mean_word_length': 4.763513513513513, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 4, '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': '6908847', 'n_tokens_mistral': 337, 'n_tokens_neox': 323, 'n_words': 47}