admin_iplookup.php

来自「国外非常不错的论坛」· PHP 代码 · 共 51 行

PHP
51
字号
<?php/*	Copyright (C) 2003-2005 UseBB Team	http://www.usebb.net		$Header: /cvsroot/usebb/UseBB/sources/admin_iplookup.php,v 1.8 2005/07/26 22:52:04 pc_freak Exp $		This file is part of UseBB.		UseBB is free software; you can redistribute it and/or modify	it under the terms of the GNU General Public License as published by	the Free Software Foundation; either version 2 of the License, or	(at your option) any later version.		UseBB is distributed in the hope that it will be useful,	but WITHOUT ANY WARRANTY; without even the implied warranty of	MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the	GNU General Public License for more details.		You should have received a copy of the GNU General Public License	along with UseBB; if not, write to the Free Software	Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA*///// Die when called directly in browser//if ( !defined('INCLUDED') )	exit();$content = '<p>'.$lang['IPLookupInfo'].'</p>';$content .= '<form action="'.$functions->make_url('admin.php', array('act' => 'iplookup')).'" method="post"><p>'.$lang['IPAddress'].': <input type="text" name="ip" id="ip" size="15" maxlength="15" /> <input type="submit" value="'.$lang['Search'].'" /></p></form>';if ( !empty($_REQUEST['ip']) && preg_match('#^[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+$#', $_REQUEST['ip']) ) {		$hostname = @gethostbyaddr($_REQUEST['ip']);		if ( !empty($hostname) && $_REQUEST['ip'] != $hostname )		$content .= '<p>'.sprintf($lang['IPLookupResult'], '<em>'.$_REQUEST['ip'].'</em>', '<em>'.$hostname.'</em>').'</p>';	else		$content .= '<p>'.sprintf($lang['IPLookupNotFound'], '<em>'.$_REQUEST['ip'].'</em>').'</p>';	}$admin_functions->create_body('iplookup', $content);$template->set_js_onload("set_focus('ip')");?>

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?