搜索
首页php教程PHP源码php精简高速ip查询免费版3.0

php精简高速ip查询免费版3.0 

1.IP地址查询php版,采用淘宝IP地址库,非常的精准。并且会随着淘宝IP地址库实时更新。所以您获得的数据将会是最新的。 
2.此3.0核心函数代码加密 其它2.0 1.0 版本完全开源 
3.define('SINA_SAE', '0'); //是否启用新浪SAE平台1为使用0为不使用 如使用新浪SAE平台必须开启memcache 
4.define('REWRITE', '0'); //是否启用伪静态 
5.集成WhoIs信息查询接口 

.htaccess 通用伪静态规则 其它规则请参考下面的进行修改 
RewriteEngine on 
RewriteRule ^(.*)$ index.php?id=$1 [L] 

sina SAE专版伪静态规则 
- rewrite: if (!is_dir() && !is_file() && path ~ "/(.*)" ) goto "index.php?$1" 

文件说明 
index.php      主程序 
function.php   主函数 

其它文件 
readme.txt     说明文件 
cacheip.txt    数据缓存文件 
bg_body.jpg    背景图 

[PHP]代码   

<?php ob_start(&#39;ob_gzip&#39;);   //gzip压缩
define(&#39;SINA_SAE&#39;, &#39;0&#39;); //是否启用新浪SAE平台1为使用0为不使用
define(&#39;REWRITE&#39;, &#39;0&#39;); //是否启用伪静态 1为启用0为不启用
$weburl=getenv(&#39;SERVER_NAME&#39;);
require_once(&#39;function.php&#39;);
$weblink=REWRITE?"http://".$weburl."/":"http://".$weburl."/?";if(count($_GET)>0){$urlip=array_keys($_GET);$urlip=str_replace("/","",str_replace("_",".",$urlip[0]));}
$ipname=$ip=$_POST[&#39;ip&#39;]?$_POST[&#39;ip&#39;]:$urlip;?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<TITLE><?php if($ip){echo $urlip.",";}?>IP地址查询,淘宝ip,新浪ip,电脑IP地址查询,网站IP地址查询,精确IP地址查询-<?=$weburl;?></TITLE>
<META NAME="Generator" CONTENT="ip,代理IP查询,IP地址查询">
<META NAME="Author" CONTENT="IP查询,tbip.sinaapp.com">
<META NAME="Keywords" CONTENT="电脑IP地址查询,淘宝ip,新浪ip,网站IP地址查询,IP地址查询,代理IP查询,域名ip地址,域名whois,<?=$weburl;?>">
<META NAME="Description" CONTENT="电脑IP地址查询主要能够查询本地电脑的ip,网站IP地址,域名ip地址,ip所在省区,域名whois信息,代理IP查询并提供IP地址查询php源码下载尽在<?=$weburl;?>">
<style type="text/css">body {font-size:14px;line-height:150%;background-image: url(<?=$weblink?>bg_body.jpg);background-repeat:repeat-x;}
a{ text-decoration:none; color:#990000}.detect_table {border: 1px solid #C3E1EE;border-collapse: collapse;margin-top: 5px;width: 650px;}</style>
<SCRIPT LANGUAGE="JavaScript">function checkIP(){var ipArray,ip,j;ip = document.ipform.ip.value;if(/[A-Za-z_-]/.test(ip)){if(!/^([\w-]+\.)+((com)|(net)|(org)|(gov\.cn)|(info)|(cc)|(com\.cn)|(com\.hk)|(net\.cn)|(org\.cn)|(com\.ru)|(net\.ru)|(org\.ru)|(name)|(biz)|(hk)|(vn)|(com\.sg)|(pk)|(ph)|(ac)|(bz)|(de)|(net\.au)|(my)|(tv)|(us)|(jp)|(kr)|(sg)|(mn)|(cd)|(ue)|(sh)|(lc)|(hn)|(me)|(la)|(cc)|(tk)|(com\.tw)|(cm)|(cn))$/.test(ip)){alert("不是正确的域名,请检查域名格式或看是否有空格");	document.ipform.ip.focus();return false;}}else{ipArray = ip.split(".");j = ipArray.length;if(j!=4){alert("不是正确的IP");document.ipform.ip.focus();return false;}for(var i=0;i<4;i++){if(ipArray[i].length==0 || ipArray[i]>255){alert("不是正确的IP");document.ipform.ip.focus();return false;}}}}google_ad_client = "ca-pub-2006512290696014";google_ad_slot = "6662313368";google_ad_width = 468;google_ad_height = 60;
</script></head><body>
<?php
if(!$ip)$ip=get_real_ip();
$ip=preg_match(&#39;/((\w|-)+\.)+[a-z]{2,4}/i&#39;,$ip)?gethostbyname($ip):$ip;$ipdata=ipdata($ip,&#39;all&#39;);?>
<p align="center" style="margin-top:100px">
<p> </p><p><a href="http://ref.so/pv18" title="<?=$weburl;?>IP查询介绍" target="_blank">IP查询</a></p>
</p>
<p class="c" align="center">
<p>
<FORM METHOD=POST ACTION="" name="ipform" onsubmit="return checkIP();">
<p>IP地址或域名:
<input type="text" name="ip" size="27" maxlength="100" title="<?=$weburl;?>提醒您在此输入ip或域名" id="url" value="<?=$ipname?>"> 
<input type="submit" value="查 询" id="sub"><INPUT TYPE="hidden" name="action" value="2"></p>
</FORM>
<p><?php
if(is_ip($ip)){
	$ipaddress=$ipdata->country;
	if($ipdata->region==$ipdata->city){$ipaddress.=$ipdata->city;}else{$ipaddress.=$ipdata->region.$ipdata->city;}
	$ipaddress.=$ipdata->isp;
	echo "您查询的IP: [<a href=&#39;".$weblink.$ip."&#39;><font color=#FF0000>".$ip."</font></a>]IP详细地址: [<font color=#FF0000>".$ipaddress."</font>]<br/>"; 
}else{echo "囧,你输入的IP,居然不能查询到!不是输入错误?";}
$ipdaili=$_SERVER[&#39;REMOTE_ADDR&#39;];
if(!in_array($ipdaili,array(&#39;127.0.0.1&#39;,$ip,$_SERVER[&#39;SERVER_ADDR&#39;],get_real_ip()))){
	echo "您的代理IP是[<a href=&#39;".$weblink.$ipdaili."&#39;><font color=#FF0000>".$ipdaili."</font></a>]     来自".ipdata($ipdaili)."";
}
$whiosip=$_POST[&#39;ip&#39;]?$_POST[&#39;ip&#39;]:$urlip;
if($whiosip){preg_match(&#39;/((\w|-)+\.)+[a-z]{2,4}/i&#39;,$whiosip) ? $whois=str_replace("www.","",$whiosip):"";}
if($whois){echo "<br /><br /><a href=&#39;http://2.tbip.sinaapp.com/whois.php?d=".$whois."&#39; target=&#39;_blank&#39; title=&#39;数据来源于本站WhoIs信息查询接口&#39;>".$whois." WhoIs信息</a> <a href=&#39;http://www.ddung.org/tool/icp/index.php?k=".$whois."&#39; target=&#39;_blank&#39; title=&#39;数据来源于迷糊工具网 www.ddung.org备案信息查询接口&#39;>".$whois." 备案信息</a> <a href=&#39;http://72e.hbwanghai.com/domain/who_single.aspx?DomainName=".$whois."&#39; title=&#39;数据来源于联动天下72e.hbwanghai.com WhoIs信息查询接口&#39; target=&#39;_blank&#39;>".$whois." WhoIs信息</a>";}$sinaip=sinaip($ip);if($whois){cacheip($whiosip);}else{cacheip($ip);}
?></p></p></p>
<p align="center" style="margin-top:50px">
<table class="detect_table" id="ip_all">
<tbody><tr><th>IP</th><th>国家/地区</th><th>省份</th><th>城市</th><th>运营商</th><th>来源</th></tr>
<tr><td align="center"><span class="sip"><?=$ip;?></span></td><td align="center"><?=$ipdata->country.$ipdata->area?></td><td align="center"><?=$ipdata->region?></td><td align="center"><?=$ipdata->city?></td><td align="center"><?=$ipdata->isp?></td><td align="center">淘宝</td></tr>
<tr><td align="center"><span class="sip"><?=$ip;?></span></td><td align="center"><?=$sinaip[3]?></td><td align="center"><?=$sinaip[4]?></td><td align="center"><?=$sinaip[5]?></td><td align="center"><?=$sinaip[9]?><?=$sinaip[7]?></td><td align="center">新浪</td></tr>
  <tr><td align="center"><span class="sip">其它结果</span></td><td align="center"><a href="http://2.tbip.sinaapp.com/?ip=<?=$ip?>&type=qq" target="_blank">腾讯搜索结果</a></td><td align="center"><a href="http://2.tbip.sinaapp.com/?ip=<?=$ip?>&type=chunzhen" target="_blank">纯真搜索结果</a></td><td align="center"><a href="http://2.tbip.sinaapp.com/?ip=<?=$ip?>&type=pconline" target="_blank">太平洋搜索结果</a></td><td align="center"><a href="http://2.tbip.sinaapp.com/?ip=<?=$ip?>&type=google" target="_blank">谷歌搜索结果</a></td><td align="center"><a href="http://2.tbip.sinaapp.com/?ip=<?=$ip?>&type=youdao" target="_blank">有道搜索结果</a></td></tr>
</tbody></table><br><table class="detect_table" id="ip_all">
<tbody><tr>
<?php foreach(cacheip() as $k => $v){
if($k==6)echo "</tr><tr>";
echo &#39;<td align="center"><a href="&#39;.$weblink.$v.&#39;">&#39;.$v.&#39;</a></td>&#39;;}?></tr>
</tbody></table><br>
<?=base64_decode("PHNjcmlwdCB0eXBlPSJ0ZXh0L2phdmFzY3JpcHQiIHNyYz0iaHR0cDovL3BhZ2VhZDIuZ29vZ2xlc3luZGljYXRpb24uY29tL3BhZ2VhZC9zaG93X2Fkcy5qcyI+PC9zY3JpcHQ+");?>
  <p>Copyright &copy; <a href="http://72e.hbwanghai.com" target="_blank">联动天下</a> <a href="http://www.ddung.org/tool/icp/" target="_blank">域名备案查询</a> <a href="http://taokehui.sinaapp.com" target="_blank">健康减肥</a> All Rights Reserved <a href="<?=$weblink;?>"><?=$weburl;?></a> <a href="http://www.ctdisk.com/u/349707/437278" target="_blank">源码下载</a></p><p>本站为非赢利站点,如有好的建议和意见请发email:web@hbwanghai.com.给我们留言谢谢!
<br>
如果您觉得本站对您的朋友有帮助,别忘了告诉他(她)们哟 ^_^<br>点击广告赞助本站开发!</p><p class="bdlikebutton"></p>
<script id="bdlike_shell"></script>
<script>var bdShare_config = {"type":"large","color":"blue","uid":"533431","share":"yes"};
document.getElementById("bdlike_shell").src="http://bdimg.share.baidu.com/static/js/like_shell.js?t=" + new Date().getHours();
</script></p><p style="display:none"><script language="javascript" type="text/javascript" src="http://js.users.51.la/3729735.js"></script></p></body>
</html><?php ob_end_flush(); ?>

  

 QQ截图20120602103554.png                     

php精简高速ip查询免费版3.0

                                           

声明
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系admin@php.cn
php怎么把负数转为正整数php怎么把负数转为正整数Apr 19, 2022 pm 08:59 PM

php把负数转为正整数的方法:1、使用abs()函数将负数转为正数,使用intval()函数对正数取整,转为正整数,语法“intval(abs($number))”;2、利用“~”位运算符将负数取反加一,语法“~$number + 1”。

php怎么实现几秒后执行一个函数php怎么实现几秒后执行一个函数Apr 24, 2022 pm 01:12 PM

实现方法:1、使用“sleep(延迟秒数)”语句,可延迟执行函数若干秒;2、使用“time_nanosleep(延迟秒数,延迟纳秒数)”语句,可延迟执行函数若干秒和纳秒;3、使用“time_sleep_until(time()+7)”语句。

php字符串有没有下标php字符串有没有下标Apr 24, 2022 am 11:49 AM

php字符串有下标。在PHP中,下标不仅可以应用于数组和对象,还可应用于字符串,利用字符串的下标和中括号“[]”可以访问指定索引位置的字符,并对该字符进行读写,语法“字符串名[下标值]”;字符串的下标值(索引值)只能是整数类型,起始值为0。

php怎么除以100保留两位小数php怎么除以100保留两位小数Apr 22, 2022 pm 06:23 PM

php除以100保留两位小数的方法:1、利用“/”运算符进行除法运算,语法“数值 / 100”;2、使用“number_format(除法结果, 2)”或“sprintf("%.2f",除法结果)”语句进行四舍五入的处理值,并保留两位小数。

php怎么读取字符串后几个字符php怎么读取字符串后几个字符Apr 22, 2022 pm 08:31 PM

在php中,可以使用substr()函数来读取字符串后几个字符,只需要将该函数的第二个参数设置为负值,第三个参数省略即可;语法为“substr(字符串,-n)”,表示读取从字符串结尾处向前数第n个字符开始,直到字符串结尾的全部字符。

php怎么根据年月日判断是一年的第几天php怎么根据年月日判断是一年的第几天Apr 22, 2022 pm 05:02 PM

判断方法:1、使用“strtotime("年-月-日")”语句将给定的年月日转换为时间戳格式;2、用“date("z",时间戳)+1”语句计算指定时间戳是一年的第几天。date()返回的天数是从0开始计算的,因此真实天数需要在此基础上加1。

php怎么替换nbsp空格符php怎么替换nbsp空格符Apr 24, 2022 pm 02:55 PM

方法:1、用“str_replace("&nbsp;","其他字符",$str)”语句,可将nbsp符替换为其他字符;2、用“preg_replace("/(\s|\&nbsp\;||\xc2\xa0)/","其他字符",$str)”语句。

php怎么查找字符串是第几位php怎么查找字符串是第几位Apr 22, 2022 pm 06:48 PM

查找方法:1、用strpos(),语法“strpos("字符串值","查找子串")+1”;2、用stripos(),语法“strpos("字符串值","查找子串")+1”。因为字符串是从0开始计数的,因此两个函数获取的位置需要进行加1处理。

See all articles

热AI工具

Undresser.AI Undress

Undresser.AI Undress

人工智能驱动的应用程序,用于创建逼真的裸体照片

AI Clothes Remover

AI Clothes Remover

用于从照片中去除衣服的在线人工智能工具。

Undress AI Tool

Undress AI Tool

免费脱衣服图片

Clothoff.io

Clothoff.io

AI脱衣机

AI Hentai Generator

AI Hentai Generator

免费生成ai无尽的。

热门文章

R.E.P.O.能量晶体解释及其做什么(黄色晶体)
3 周前By尊渡假赌尊渡假赌尊渡假赌
R.E.P.O.最佳图形设置
3 周前By尊渡假赌尊渡假赌尊渡假赌
R.E.P.O.如果您听不到任何人,如何修复音频
3 周前By尊渡假赌尊渡假赌尊渡假赌

热工具

SublimeText3 英文版

SublimeText3 英文版

推荐:为Win版本,支持代码提示!

螳螂BT

螳螂BT

Mantis是一个易于部署的基于Web的缺陷跟踪工具,用于帮助产品缺陷跟踪。它需要PHP、MySQL和一个Web服务器。请查看我们的演示和托管服务。

mPDF

mPDF

mPDF是一个PHP库,可以从UTF-8编码的HTML生成PDF文件。原作者Ian Back编写mPDF以从他的网站上“即时”输出PDF文件,并处理不同的语言。与原始脚本如HTML2FPDF相比,它的速度较慢,并且在使用Unicode字体时生成的文件较大,但支持CSS样式等,并进行了大量增强。支持几乎所有语言,包括RTL(阿拉伯语和希伯来语)和CJK(中日韩)。支持嵌套的块级元素(如P、DIV),

SublimeText3 Mac版

SublimeText3 Mac版

神级代码编辑软件(SublimeText3)

SublimeText3 Linux新版

SublimeText3 Linux新版

SublimeText3 Linux最新版