<commit_before><?php

	ini_set('display_errors', 1);

	// Free Geolocation API
	// https://freegeoip.net/
	$endpoint = 'https://freegeoip.net/json/85.90.227.224';

	// Instantiate class
	include('../src/cache.class.php');
	$geoIP = new Cache(array(
		'container_path' => 'cache',
		'key' => 'geoip',
		'expire' => 'hourly',
		'limit' => 10
	));

	// Make request
	$geoIp = $geoIP->get($endpoint);
	$geoIp = json_decode($geoIp, true);

	// Output
	print_r($geoIp);

?><commit_msg>Using a demo endpoint that's actually available<commit_after><?php

	ini_set('display_errors', 1);
	header('Content-Type: text/plain');

	// Free Geolocation API
	// https://freegeoip.net/
	$endpoint = 'http://chrisullyott.com/blog/2014-12-29-valley-of-fire/';

	// Instantiate class
	include('../src/cache.class.php');
	$geoIP = new Cache(array(
		'container' => 'cache',
		'key' => 'geoip',
		'expire' => 'hourly',
		'limit' => 10
	));

	// Make request
	$geoIp = $geoIP->get($endpoint);
	$geoIp = json_decode($geoIp, true);

	// Output
	print_r($geoIp);

?>
{'fraction_non_alphanumeric': 0.2136669874879692, 'fraction_numerical': 0.023099133782483156, 'mean_word_length': 3.7488584474885847, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 15, 'https://': 3, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 1, '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': '6561026', 'n_tokens_mistral': 435, 'n_tokens_neox': 398, 'n_words': 72}