⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 checkip.asp

📁 wap源码要的速度下wap源码要的速度下
💻 ASP
字号:
<%
'使用纯真IP数据,绝对好用
'如果需要更新的数据库,请联系草屋主人(QQ:253501063)email:17biz@126.com

Dim ip,ipaddress
ip=request("ip")
If ip="" Then
	ip=request.ServerVariables("REMOTE_HOST")
	ipaddress="你的IP:"&ip &"来自:"&getaddress(ip)
else
	ipaddress=getaddress(ip)
End If
Function getaddress(sip)'查询函数
	Dim str1,str2,str3,str4
	Dim num
	Dim irs
	If isnumeric(left(sip,2)) Then
		If sip="127.0.0.1" Then sip="192.168.0.1"
		str1=left(sip,instr(sip,".")-1)
		sip=mid(sip,instr(sip,".")+1)
		str2=left(sip,instr(sip,".")-1)
		sip=mid(sip,instr(sip,".")+1)
		str3=left(sip,instr(sip,".")-1)
		str4=mid(sip,instr(sip,".")+1)
		If isNumeric(str1)=0 Or isNumeric(str2)=0 Or isNumeric(str3)=0 Or isNumeric(str4)=0 Then
		Else
			num=cint(str1)*256*256*256+cint(str2)*256*256+cint(str3)*256+cint(str4)-1
			Dim adb,aConnStr,AConn
			adb = "QQWry.Dat"
			aConnStr = "Provider = Microsoft.Jet.OLEDB.4.0;Data Source = " & Server.MapPath(adb)
			Set AConn = Server.CreateObject("ADODB.Connection")
			aConn.Open aConnStr
			sql="select * from ip  where StartIP <="&num&" and EndIP >="&num
			Set irs=AConn.Execute(sql)
			If irs.eof And irs.bof Then 
				getaddress="没有数据"
			Else
				Do While Not irs.eof
					getaddress=getaddress &irs("pos") & irs("Detail")
				irs.movenext
				Loop
			End If
			irs.close
			Set irs=nothing
			Set AConn=Nothing
		End If
	Else
		getaddress="无效IP"
	End If
End Function
%><!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=gb2312" />
<title>IP地址查询</title>
<style type="text/css">
<!--
#f {
	padding: 0px;
	width: 500px;
	margin-right: auto;
	margin-left: auto;
}
#box {
	padding: 0px;
	width: 500px;
	margin-right: auto;
	margin-left: auto;
	border: 1px solid #CCCCCC;
}
body,td,th {
	font-family: Geneva, Arial, Helvetica, sans-serif;
	font-size: 12px;
}
-->
</style>
</head>

<body>
<div id="f"><form name="form1" id="form1" method="get" action="">
    IP地址:
      <input name="ip" type="text" value="<%=request("ip")%>" />
      <input type="submit" name="Submit" value="查询" />
  </form></div>
<div id="box">
  <%=replace(ipaddress,"CZ88.NET","")%>
</div>
</body>
</html>

⌨️ 快捷键说明

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