<?php

//ブラウザの言語設定をチェックし
//日本語、英語（US）、韓国語、中国語（台湾、中国）の場合はlanguage=1を返す

$LANGUAGES_FOR_SPICE_BOX = array('ja', 'en-us', 'ko', 'zh');

//$isAkamai = "true"; //Akamai
$isAkamai = "false"; //Akamai
$isC = "true"; //C
$isJA = "false"; //ja

/*
foreach ($LANGUAGES_FOR_SPICE_BOX as $tmp)
{
	//server
	if (preg_match( "/^".$tmp."/i", $_SERVER['HTTP_ACCEPT_LANGUAGE']))
	{
		//spicebox
		$isAkamai = "false";
		last;
	}
}
*/

//temp
if (preg_match( "/^en-us/i", $_SERVER['HTTP_ACCEPT_LANGUAGE']))
{
	//spicebox
	$isC = "false";
	last;
}

//ja
if (preg_match( "/^ja/i", $_SERVER['HTTP_ACCEPT_LANGUAGE']))
{
	//spicebox
	$isJA = "true";
	last;
}

header( "Content-type: application/json" );
//header( "Content-type: text/plain" );
?>
{"date":"<?php echo preg_replace("/\//","\/",gmdate("Y\/m\/d H:i:s \G\M\T O")) ?>","isAkamai":<?php echo $isAkamai ?>,"isC":<?php echo $isC ?>,"isJA":<?php echo $isJA ?>}
