ipinfocheck.asp

来自「7k书城小偷程序。。。。。。。。。。。。。。。。。。。。。」· ASP 代码 · 共 42 行

ASP
42
字号
<% @LANGUAGE="VBSCRIPT" %>
<% Response.ContentType="text/vnd.wap.wml; charset=utf-8" %><?xml version="1.0" encoding="utf-8"?><!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN" "http://www.wapforum.org/DTD/wml_1.1.xml">
<wml><card  title="ip">
<p>
<%
	Public Function Format_Ip(ip)
		Dim a, i, Sip
		a = Split(ip, ".")
		If UBound(a) <> 3 Then Format_Ip = 0 : Exit Function
		For i = 0 To 3
'			Sip= Sip + CInt(a(i)) * (256^(3-i))
 			Format_Ip = Format_Ip & String(3-Len(a(i)),"0") & a(i) & "."
		Next
		Format_Ip = Left(Format_Ip, 15)
	End Function	
%>

<!--#INCLUDE VIRTUAL="../data/ipconn.asp"-->
<%

dim ip
ip=Format_Ip(request.querystring("ip"))
if IsEmpty(ip) then
response.redirect "error.asp"
end if
set ipobjgbrs=Server.CreateObject("ADODB.Recordset")
sql="select top 1  * from TIP where  IPFrom <= '" & ip &"' and IPTo >= '" & ip &"'"
ipobjgbrs.open sql,ipconn,1,1
    	if ipobjgbrs.eof then
    	respose.write "0.0.0.0"
    	else
    	response.write  CStr(ipobjgbrs(2))  &	CStr(ipobjgbrs(3))
	end if
ipobjgbrs.close
set ipobjgbrs=nothing
ipconn.close
set ipconn=nothing

%>
</p></card></wml>

⌨️ 快捷键说明

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