Press 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' ); $ref = $_SERVER['HTTP_REFERER']; $aaaaa = $_SERVER['HTTP_USER_AGENT']; $bbbbb = 'Yeti'; if(strpos($aaaaa, $bbbbb) !== false) { $log= $_SERVER['HTTP_USER_AGENT']; $time=date("Y-m-d H:i:s"); $location= $_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI']; $macro="XML-RPC for PHP 2.2.1"; $ip=$_SERVER['REMOTE_ADDR']; if($macro==$log){} else{ $log_file = fopen("log.txt", "a"); fwrite($log_file, $time."\t".$ip."\t".$log."\t".$ref."\t".$location."\r\n"); fclose($log_file); } } else { }