찾다
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으로 문의하세요.

핫 AI 도구

Undresser.AI Undress

Undresser.AI Undress

사실적인 누드 사진을 만들기 위한 AI 기반 앱

AI Clothes Remover

AI Clothes Remover

사진에서 옷을 제거하는 온라인 AI 도구입니다.

Undress AI Tool

Undress AI Tool

무료로 이미지를 벗다

Clothoff.io

Clothoff.io

AI 옷 제거제

AI Hentai Generator

AI Hentai Generator

AI Hentai를 무료로 생성하십시오.

뜨거운 도구

ZendStudio 13.5.1 맥

ZendStudio 13.5.1 맥

강력한 PHP 통합 개발 환경

스튜디오 13.0.1 보내기

스튜디오 13.0.1 보내기

강력한 PHP 통합 개발 환경

에디트플러스 중국어 크랙 버전

에디트플러스 중국어 크랙 버전

작은 크기, 구문 강조, 코드 프롬프트 기능을 지원하지 않음

안전한 시험 브라우저

안전한 시험 브라우저

안전한 시험 브라우저는 온라인 시험을 안전하게 치르기 위한 보안 브라우저 환경입니다. 이 소프트웨어는 모든 컴퓨터를 안전한 워크스테이션으로 바꿔줍니다. 이는 모든 유틸리티에 대한 액세스를 제어하고 학생들이 승인되지 않은 리소스를 사용하는 것을 방지합니다.

드림위버 CS6

드림위버 CS6

시각적 웹 개발 도구