<!--#include file="Inc/Const.asp" -->
<!--#include file="Inc/iXs_Ip.asp" -->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<META NAME="googlebot" CONTENT="ALL">
<meta name="robots" content="ALL">
<meta name="description" content="IP地址查询,ip数据库,手机号码归属地,邮政编码,长途电话区号,身份证号码验证,世界时间,万年历,">
<meta name="keywords" content="ip,查ip,ip查询,ip,IP地址查询,ip数据库,手机号码归属地,邮政编码,长途电话区号,身份证号码验证,世界时间,万年历">
<title>IP查询 - ip,查ip、IP查询 查IP地址 ip数据库 手机号码归属地、邮政编码 身份证号码验证、便民查询网 - 做最专业的便民信息服务网站
</title>
<link href="Skins/Style_1.css" rel="stylesheet" type="text/css">
<script language=javascript>
function checkkey(){
  if (document.Look_Ip.IpStr.value == "")
  {alert("对不起，您没有输入IP地址或域名！请输入！");
    document.Look_Ip.IpStr.focus();
    return (false);} 		  
}
//-->
</script><script language="javascript1.2" src="Js/iXs_Main.js"></script>
</head>
<body>
<!--#include virtual="/Inc/Head.asp" -->
<%
Server.ScriptTimeout = 9999

Dim Action, IpStr
Dim IpDataInfo
Dim i

Action = iXs.ReqNum("Action")
IpStr = iXs.ReqStr("IpStr")
IpStr = iXs.RegExpFilter("\s+", IpStr, 1, vbCRLF)

' 缓存IP地址库版本信息
iXs.Name = "iXsTemp_IpDataInfo"
If iXs.ObjIsEmpty Then
	Call iXs.DelCache("iXsTemp_IpDataInfo", 0)
	' 获取版本信息和数据库IP数量
	iXs.Value = WryInfo()
End If
IpDataInfo = iXs.Value

iXs.User_Agent = Request.ServerVariables("HTTP_USER_AGENT")

If Action = "" Then Action = 0
%>
<%If Action = 2 Then%><table width="60%" border="0" align="center" cellpadding="2" cellspacing="1" bordercolor="#F0F0F0" bgcolor="#F0F0F0">
	<tr bordercolor="#3B6DC4" bgcolor="#3B6DC4">
	  <td height="1" colspan="3" class="White"></td>
	</tr>
	<tr bordercolor="#3B6DC4" bgcolor="#3B6DC4">
	  <td colspan="3" class="White">－<strong>调用代码</strong>－</td>
	</tr>
	<tr bordercolor="#F0F0F0" bgcolor="#F0F0F0">
	  <td colspan="3" bgcolor="#F0F0F0"><span class="Font_1">·</span><strong class="Red">在您的主页上加入以下的代码即可显示来访者的IP信息。</strong></td>
	</tr>
	<tr bordercolor="#F0F0F0" bgcolor="#F0F0F0">
	  <td colspan="3" bgcolor="#F0F0F0"><div style="border:1px solid #ADD7FF; width:100%; color:infotext; background-color:infobackground; font:bold 11px  Tahoma, '宋体';">&lt;script language=&quot;javascript1.2&quot; src=&quot;<% = iXs.Sys_Info(0) %>IpInfo.asp<span class="Red">?sType=0</span>&quot;&gt;&lt;/script&gt;</div></td>
	</tr>
	<tr bordercolor="#F0F0F0" bgcolor="#ADD7FF">
	  <td colspan="3"><span class="Font_1">·</span>效果演示：</td>
	</tr>
	<tr bordercolor="#F0F0F0" bgcolor="#F0F0F0">
	  <td colspan="3" align="center" bgcolor="#FFFFFF" onMouseOver="this.bgColor='#ADD7FF';" onMouseOut="this.bgColor='#FFFFFF';"><script language="javascript1.2" src="IpInfo.asp"></script></td>
	</tr>
	<tr bordercolor="#3B6DC4" bgcolor="#3B6DC4">
	  <td colspan="3" class="White">－<span style="font-weight: bold">参数说明</span>－</td>
	</tr>
	<tr bordercolor="#FFEE9D" bgcolor="#FFEE9D" onMouseOver="this.bgColor='#ADD7FF';" onMouseOut="this.bgColor='#FFEE9D';">
	  <td width="70" bgcolor="#FFFFFF">IP 地 址</td>
	  <td width="70" bgcolor="#FFFFFF"><strong>sType=1</strong></td>
	  <td width="294" bgcolor="#FFFFFF"><span class="Font_1">·</span>显示来访者的IP地址</td>
	</tr>
	<tr bordercolor="#FFEE9D" bgcolor="#FFEE9D" onMouseOver="this.bgColor='#ADD7FF';" onMouseOut="this.bgColor='#FFEE9D';">
	  <td bgcolor="#FFFFFF">国家信息</td>
	  <td bgcolor="#FFFFFF"><strong>sType=2</strong></td>
	  <td bgcolor="#FFFFFF"><span class="Font_1">·</span>显示该IP对应的国家、省份、单位、公司名称等</td>
	</tr>
	<tr bordercolor="#FFEE9D" bgcolor="#FFEE9D" onMouseOver="this.bgColor='#ADD7FF';" onMouseOut="this.bgColor='#FFEE9D';">
	  <td bgcolor="#FFFFFF">地域信息</td>
	  <td bgcolor="#FFFFFF"><strong>sType=3</strong></td>
	  <td bgcolor="#FFFFFF"><span class="Font_1">·</span>显示该IP对应的地域、地市、上网方式等</td>
	</tr>
	<tr bgcolor="#FFFFFF">
	  <td colspan="3" bgcolor="#FFFFFF"><span class="Font_1">·</span>如果在调用语句中省略了“<span class="Red">?sType=*</span>”参数，那么就会按以上演示的效果显示。</td>
  </tr>
	<tr bgcolor="#FFFFFF">
	  <td colspan="3" bgcolor="#FFFFFF"><span class="Font_1">·</span>以上信息如果数据库中没有或者查询过程错误都是显示为“<strong>未知</strong>”或者为空。</td>
  </tr>
	<tr bordercolor="#3B6DC4" bgcolor="#3B6DC4">
	  <td colspan="3" class="White">－<strong>图形调用</strong>－</td>
  </tr>
	<tr bordercolor="#ADD7FF" bgcolor="#ADD7FF">
	  <td colspan="3"><div style="border:1px solid #ADD7FF; width:100%; color:infotext; background-color:infobackground; font:bold 11px  Tahoma, '宋体';">&lt;script language=&quot;javascript1.2&quot; src=&quot;<% = iXs.Sys_Info(0) %>IpInfo.asp<span class="Red">?Action=1</span>&quot;&gt;&lt;/script&gt;</div></td>
  </tr>
	<tr bordercolor="#ADD7FF" bgcolor="#ADD7FF">
	  <td colspan="3">效果演示：</td>
  </tr>
	<tr align="center" bordercolor="#FFFFFF" bgcolor="#FFFFFF">
	  <td colspan="3"><script language="javascript1.2" src="IpInfo.asp?Action=1"></script></td>
  </tr>
	<tr bordercolor="#ADD7FF" bgcolor="#ADD7FF">
	  <td colspan="3">调用说明：</td>
  </tr>
	<tr bordercolor="#ADD7FF" bgcolor="#ADD7FF">
	  <td colspan="3"><span class="Font_1">·</span>以上图片可以作为您的IP签名图片使用，但是因为当前系统是采用ASP+无组件图形处理生成的，执行速度较慢。</td>
  </tr>
	<tr bordercolor="#3B6DC4" bgcolor="#3B6DC4">
	  <td height="1" colspan="3"></td>
	</tr>
</table>
        <% Else %><table width="60%" border="0" align="center" cellpadding="2" cellspacing="1" bordercolor="#FFFFFF" bgcolor="#FFFFFF">
          <tr>
            <td height="1" colspan="2" class="White"></td>
          </tr>
          <tr bgcolor="#3B6DC4" class="White">
            <td colspan="2" class="White">－<strong>IP地址查询</strong>－（版本：<span class="Yellow">
           	<% = IpDataInfo(0) %>
            </span>，共有记录：<span class="Yellow">
            <% = IpDataInfo(1) %></span> 条）</td>
          </tr>
          <tr bordercolor="#F0F0F0" bgcolor="#F0F0F0">
            <td width="30%" bordercolor="#F0F0F0" bgcolor="#F0F0F0"><span class="Font_1">·</span><strong>您的IP地址：</strong></td>
            <td width="340" bordercolor="#F0F0F0" bgcolor="#F0F0F0" class="Red" onMouseOver="this.bgColor='#FFFFFF';" onMouseOut="this.bgColor='#F0F0F0';"><strong>
            <% = iXs.ReqIp() %></strong></td>
          </tr>
          <tr bordercolor="#F0F0F0" bgcolor="#F0F0F0">
            <td width="30%" bordercolor="#F0F0F0" bgcolor="#F0F0F0"><span class="Font_1">·</span><strong>IP所在位置：</strong></td>
            <td class="Blue" onMouseOver="this.bgColor='#FFFFFF';" onMouseOut="this.bgColor='#F0F0F0';"><% = Look_Ip(iXs.ReqIp()) %></td>
          </tr>
          <tr bordercolor="#F0F0F0" bgcolor="#F0F0F0">
            <td width="30%" bordercolor="#F0F0F0" bgcolor="#F0F0F0"><span class="Font_1">·</span><strong>您的操作系统：</strong></td>
            <td onMouseOver="this.bgColor='#FFFFFF';" onMouseOut="this.bgColor='#F0F0F0';"><% = iXs.ClientInfo(0) %></td>
          </tr>
          <tr bordercolor="#F0F0F0" bgcolor="#F0F0F0">
            <td width="30%" bordercolor="#F0F0F0" bgcolor="#F0F0F0"><span class="Font_1">·</span><strong>浏览器的类型：</strong></td>
            <td onMouseOver="this.bgColor='#FFFFFF';" onMouseOut="this.bgColor='#F0F0F0';"><% = iXs.ClientInfo(1) %></td>
          </tr>
          <tr bordercolor="#F0F0F0" bgcolor="#F0F0F0">
            <td width="30%" bordercolor="#F0F0F0" bgcolor="#F0F0F0"><span class="Font_1">·</span><strong>您的屏幕信息：</strong></td>
            <td onMouseOver="this.bgColor='#FFFFFF';" onMouseOut="this.bgColor='#F0F0F0';"><script language="javascript1.2">document.write(screen.width + "&times;" + screen.height + "；(" + screen.colorDepth + " 位色深)");</script></td>
          </tr>
          <tr bordercolor="#3B6DC4" bgcolor="#3B6DC4">
            <td height="1" colspan="2"></td>
          </tr>
          <tr bordercolor="#F0F0F0" bgcolor="#F0F0F0">
            <td colspan="2"><table width="100%"  border="0" cellpadding="0" cellspacing="0" id="IP_Table">
                <form name="Look_Ip" method="post" action="?Action=1" onSubmit="return checkkey()">
                  <tr>
                    <td width="73%" id="IP_Data"><span class="Font_1">·</span><strong>请输入IP地址：</strong>
                        <input name="IpStr" type="text" id="IpStr" size="22" maxlength="250" style="border:1px solid #000000; color:#000000; height:20px; font:bold Tahoma, '宋体'; text-align:center; text-shadow: Lime; ime-Mode:disabled;" title="多条内容请用空格分开，或者点击右边的批量查询按钮！"></td>
                    <td width="10%" align="left"><input type="submit" name="Submit2" value="查询" style="border:1px solid #3B6DC4; background-color:#3B6DC4; color:#FFFFFF; height:20px;"></td>
                    <%If iXs.Sys_Info(6) = True Or iXs.Sys_Info(7) = True Then%><td width="17%" align="center"><input name="IsBatch" type="button" id="IsBatch" value="批量查询" onClick="ShowTextArea();" style="border:1px solid #3B6DC4; background-color:#3B6DC4; color:#FFFFFF; height:20px; width:60px;"></td><%End If%>
                  </tr>
                </form>
            </table></td>
          </tr>
          <% If Action = 1 Then
				'If iXs.Sys_Info(6) = False And iXs.Sys_Info(7) = False Then
				Dim IpArr, n, m
				IpArr = Split(IpStr, vbCRLF)
				m = UBound(IpArr)
				' 判断系统是否允许批量查询
				If m >= 1 And (iXs.Sys_Info(6) = False And iXs.Sys_Info(7) = False) Then Call iXs.Alert("系统当前设置不允许批量查询", 0, 0)
				For n = 0 To m
					IpStr = iXs.RegExpFilter("\r*", IpArr(n), 1, "")
					If IpStr <> "" Then
				%>
          <tr bordercolor="#F0F0F0" bgcolor="#F0F0F0">
            <td colspan="2" bgcolor="#F0F0F0"><table width="100%"  border="0" cellpadding="2" cellspacing="1" bordercolor="#3B6DC4" bgcolor="#3B6DC4">
                <tr>
                  <td colspan="2" align="center" class="White">－<strong>来自本站的查询结果</strong>－(第 <% = n + 1 %>/<% = m + 1 %> 项)</td>
                </tr>
                <% If iXs.IsIp(IpStr) Then
					' 判断系统是否允许IP地址参与批量查询
					If m >= 1 And iXs.Sys_Info(6) = False Then Call iXs.Alert("系统当前设置不允许IP地址参与批量查询", 0, 0)
				%>
                <tr bordercolor="#FFFFFF" bgcolor="#FFFFFF" onMouseOver="this.bgColor='#F0F0F0';" onMouseOut="this.bgColor='#FFFFFF';">
                  <td width="28%" bordercolor="#F0F0F0" bgcolor="#F0F0F0"><span class="Font_1">·</span>您所查询的IP地址：</td>
                  <td width="72%" align="center"><span class="Red"><strong><% = IpStr %></strong></span></td>
                </tr>
                <tr bordercolor="#FFFFFF" bgcolor="#FFFFFF" onMouseOver="this.bgColor='#F0F0F0';" onMouseOut="this.bgColor='#FFFFFF';">
                  <td bordercolor="#F0F0F0" bgcolor="#F0F0F0"><span class="Font_1">·</span>该IP查询物理定位：</td>
                  <td align="center"><span class="Green"><strong><% = Look_Ip(IpStr) %></strong></span></td>
                </tr>
                <tr align="center" bordercolor="#F0F0F0" bgcolor="#F0F0F0">
                  <td colspan="2" bordercolor="#F0F0F0" bgcolor="#F0F0F0"><a href="http://www.whois.sc/<% = IpStr %>" target="_blank" class="Menu"><span class="Blue">查看官方 IP Whois 数据库资料</span></a></td>
                </tr>
                <tr align="center" bordercolor="#F0F0F0" bgcolor="#F0F0F0">
                  <td colspan="2" bordercolor="#F0F0F0" bgcolor="#F0F0F0">如发现小部分IP查询结果不正确请到官方网站<A href="http://www.apnic.net" target="_blank">http://www.apnic.net</A>查询,以apnic为准。</td>
                </tr>
                <tr align="center" bordercolor="#F0F0F0" bgcolor="#F0F0F0">
                  <td colspan="2" bordercolor="#F0F0F0" bgcolor="#F0F0F0"><table cellspacing="0" cellpadding="0">
                    <TR>
                      <TD align="middle"><div align="center">便民信息查询系统 Ver2.0 专业7*24小时为您服务</div></TD>
                    </TR>
                    <TR>
                      <TD align="middle"><div align="center">注:本站的IP数据库为最新的数据库,每10天自动更新一次</div></TD>
                    </TR>
                  </table>
                  </td>
                </tr>
                <% Else
					' 判断系统是否允许域名解析并参与批量查询
					If m >= 1 And iXs.Sys_Info(7) = False Then Call iXs.Alert("系统当前设置不允许域名解析并参与批量查询", 0, 0)
					Dim Domain, DomainFix
					' 域名后缀
					DomainFix = iXs.Sys_Info(2)
					
					Domain = IpStr
					
					' 先进行域名整形，如果出错则是因为域名不合法，给出提示
						' 标准域名中不包含任何斜杠和冒号等，如：www.xlfw.cn
						' 带路径的域名包含且至少包含一个斜杠，如：www.xlfw.cn:80/ddd/ddd/dd.asp
						' 带端口的域名一定包含一个冒号且随后紧跟数字，如：www.xlfw.cn:80
						' 带协议的域名前端肯定包含双斜杠，如：http://www.xlfw.cn:80/ddd/ddd/dd.asp
						' 先检测域名中是否包含协议，如果有则删除它，为了兼容，使用正则表达式
					Domain = iXs.RegExpFilter("(http|https|ftp|rtsp|mms):(\/\/|\\\\){1}", Domain, 1, "")
					' 再检测域名中是否包含斜杠，如果有，则删除并删除它后面的所有字串
					Domain = iXs.RegExpFilter("/.*", Domain, 1, "")
					' 然后应该检测域名中是否包含端口项，并删除
					Domain = iXs.RegExpFilter(":\d*", Domain, 1, "")
					' 最后验证域名格式有效性
					If InStr(Domain, ".") = 0 Then Call iXs.Alert("您的域名格式错误！\n\n请检查后重新输入！", 0, 0) ' 域名至少包含一个英文句点
					If InStr(LCase(DomainFix), LCase(Replace(CStr(iXs.RegExpSearch("\.(" & DomainFix & ")$", Domain, 1, "")), ".", ""))) = 0 Then Call iXs.Alert("您的域名后缀错误！或者当前系统拒绝此后缀的域名查询。\n\n请检查后重新输入或者联系管理员！", 0, 0) ' 应当以标准的域名后缀结尾
					
					' 利用XMLHTTP获取域名解析后的IP地址
					Dim Dm_Arr, Dm_Num, Dm_Par
					
					' 获取网页数据
					Dm_Par = iXs.GetHTTPPage("http://hexillion.com/asp/samples/AspLookup.asp?addr=" & Domain)%>
                <tr align="left" bordercolor="#F0F0F0" bgcolor="#F0F0F0">
                  <td colspan="2"><strong>您查询的域名为：<a href="http://<% = Domain %>" target="_blank"><span class="Blue" title="点击访问该站点"><% = Domain %></span></a>，其对应IP地址及物理定位如下：</strong></td>
                </tr>
					<%
					' 判断是否存在错误信息
					If InStr(LCase(Dm_Par), "<tt><strong>host not found</strong></tt>") > 0 Then Call iXs.Alert("这个域名不存在，解析失败，请检查您的输入！", 0, 0) ' 该域名不存在！
					If InStr(LCase(Dm_Par), "<tt><strong>no data</strong></tt>") > 0 Then Call iXs.Alert("这个域名合法，但是解析失败，请检查您的输入！", 0, 0) ' 该域名不存在！
					' 利用正则表达式获取包含IP串的字符串
					Dm_Par = CStr(iXs.RegExpSearch("<tt><strong>((0|[1-9]\d?|[0-1]\d{2}|2[0-4]\d|25[0-5])\.(0|[1-9]\d?|[0-1]\d{2}|2[0-4]\d|25[0-5])\.(0|[1-9]\d?|[0-1]\d{2}|2[0-4]\d|25[0-5])\.(0|[1-9]\d?|[0-1]\d{2}|2[0-4]\d|25[0-5])(<br>)?)+</strong></tt>", Dm_Par, 1, ""))
					Dm_Par = CStr(iXs.RegExpFilter("<.+?>", Dm_Par, 1, "|"))
					
					Dm_Arr = Split(Dm_Par, "|")
					Dm_Num = 0
					Dm_Par = ""
					For i = 0 To UBound(Dm_Arr)
						If iXs.IsIp(Dm_Arr(i)) = True Then
							Response.Write("<tr align=""left"" bordercolor=""#FFFFFF"" bgcolor=""#FFFFFF"" onMouseOver=""this.bgColor='#F0F0F0';"" onMouseOut=""this.bgColor='#FFFFFF';"">")
							Response.Write("<td colspan=""2""><span class=""Font_1"">·</span><a href=""IP.asp?Action=1&IpStr=" & iXs.Format_Ip(Dm_Arr(i)) & """ target=""_blank""><strong class=""red"" title=""点击查询 " & iXs.Format_Ip(Dm_Arr(i)) & " 的单个定位"">" & iXs.Format_Ip(Dm_Arr(i)) & "</strong></a> → <strong class=""green"">" & Look_Ip(Dm_Arr(i)) & "</strong></td>")
							Response.Write("</tr>")
							Dm_Num = Dm_Num + 1
						End If
					Next%>
                <tr align="right" bordercolor="#FFFFFF" bgcolor="#FFFFFF" onMouseOver="this.bgColor='#F0F0F0';" onMouseOut="this.bgColor='#FFFFFF';">
                  <td colspan="2">共 <strong><% = Dm_Num %></strong> 个结果</td>
                </tr>
				<% End If %>
            </table></td>
          </tr>
          <%
		  		Response.Flush()
				End If
				Next
		  End If %>
          <tr bordercolor="#3B6DC4" bgcolor="#3B6DC4">
            <td height="1" colspan="2"></td>
          </tr>
		  <tr id="tr1" bordercolor="#F0F0F0" bgcolor="#F0F0F0" onMouseOver="this.bgColor='#FFFFFF';" onMouseOut="this.bgColor='#F0F0F0';">
		    <td colspan="3"><table width="100%" border="0" cellpadding="2" cellspacing="0">
                <tr align="center">
                  <td><a href="IP.asp?Action=2" target="_self" class="Menu"><span class="Green"><strong>点击这里获取调用代码</strong></span></a></td>
              </tr>
            </table></td>
		  </tr>
          <tr id="tr2" bordercolor="#3B6DC4" bgcolor="#3B6DC4">
            <td height="1" colspan="2"></td>
          </tr>
        </table>
  <% End If %>
</body>
</html>
<%If iXs.Sys_Info(6) = True Or iXs.Sys_Info(7) = True Then%>
<script language="javascript1.2">
<!--
	function ShowTextArea(){
		// IP_Table, IP_Data, IsBatch
		var Obj_1 = document.getElementById("IP_Table");
		var Obj_2 = document.getElementById("IP_Data");
		var Obj_3 = document.getElementById("IsBatch");
		if (Obj_3.value != "批量查询"){
			Obj_3.value = "批量查询";
			Obj_2.innerHTML = "<span class=\"Font_1\">·</span><strong>请输入IP地址：</strong><input name=\"IpStr\" type=\"text\" id=\"IpStr\" size=\"22\" maxlength=\"250\" style=\"border:1px solid #000000; color:#000000; height:20px; font:bold Tahoma, '宋体'; text-align:center; text-shadow: Lime; ime-Mode:disabled;\" title=\"多条内容请用空格分开，或者点击右边的批量查询按钮！\">"
			// 尝试删除已经增加的对象
			try{
				myNewRow.removeNode(true);
			}
			catch(e){};
		}else{
			Obj_3.value = "简单查询";
			// 创建提示
			Obj_2.innerHTML = "<span class=\"Font_1\">·</span><strong>请在下面输入IP地址，多个用回车隔开：</strong>";
			// 创建新行
			myNewRow = Obj_1.insertRow();
			myNewCell = myNewRow.insertCell();
			myNewCell.colSpan = 3;
			myNewCell.innerHTML = "<textarea name=\"IpStr\" id=\"IpStr\" style=\"color:#000000; height:100px; width:100%; font:bold Tahoma, '宋体'; text-shadow: Lime; ime-Mode:disabled;\" title=\"IP地址查询系统！\"></textarea>";
		}
	}
-->
</script>
<%End If%>
  <!--#include virtual="/Inc/Foot.asp" -->
