This Domain(Admin5.com) is for Sale:

数据库学习:用Access分析网站实例

时间:2007-12-23  来源:不详  作者:迈克DB

CurrentProject.Connection.Execute strSql
DoEvents
strSql = "insert into ipaddress_ok (ip1,enip1,[mark],[add]) values('" & rs("ip1") & "'," & Str(rs("enip")) & ",'setting','" & rs("add") & "')"
CurrentProject.Connection.Execute strSql
DoEvents
End If

strAdd1 = rs("add")
strIP1 = rs("ip1")
lngENIP1 = rs("enip")
i = i 1 织梦内容管理系统


Form_控制.Label4.Caption = Str(Int(i / iA * 10000) / 100) & "%"
rs.MoveNext
Loop
rs.Close

strSql = "update ipaddress_ok set ip2=mid(ip2,1,len(ip2)-2) & '255'"
CurrentProject.Connection.Execute strSql
strSql = "update ipaddress_ok set enip1=enaddr(ip1)"
CurrentProject.Connection.Execute strSql
strSql = "update ipaddress_ok set enip2=enaddr(ip2)"
CurrentProject.Connection.Execute strSql
End Function
织梦内容管理系统

Function enaddr(Sip As String) As Double
'用代理无法连接的问题还要解决
'将字符的 IP 编码为长整的 IP
On Error Resume Next
Dim str1 As String
Dim str2 As String
Dim str3 As String
Dim str4 As String
Sip = CStr(Sip)
str1 = Left(Sip, CInt(InStr(Sip, ".") - 1))
Sip = Mid(Sip, CInt(InStr(Sip, ".")) 1)
str2 = Left(Sip, CInt(InStr(Sip, ".")) - 1)
Sip = Mid(Sip, CInt(InStr(Sip, ".")) 1)
str3 = Left(Sip, CInt(InStr(Sip, ".")) - 1)
str4 = Mid(Sip, CInt(InStr(Sip, ".")) 1)
enaddr = CLng(str1) * 256 * 256 * 256 CLng(str2) * 256 * 256 CLng(str3) * 256 CLng(str4) - 1
End Function 内容来自dedecms

织梦内容管理系统

Function deaddr(Sip)
'将编码为长整的 IP 重现转换为字符型的 IP
Dim s1, s21, s2, s31, s3, s4
Sip = Sip 1
s1 = Int(Sip / 256 / 256 / 256)
s21 = s1 * 256 * 256 * 256
s2 = Int((Sip - s21) / 256 / 256)
s31 = s2 * 256 * 256 s21
s3 = Int((Sip - s31) / 256)
s4 = Sip - s3 * 256 - s31
deaddr = CStr(s1) "." CStr(s2) "." CStr(s3) "." CStr(s4)
End Function 织梦好,好织梦

示例请参考:http://access911.net/down/eg/User_DHTML_search_IP.rar 内容来自dedecms

上述程序会自动去 http://ip.loveroot.com/index.php?job=search 搜索所有的 IP 以及对应的物理地址并保存到中

修订:刚才上了一下网站,发现界面竟然改了,又重新修改了一下读取页面的程序。

dedecms.com

关于 WebBrowser 控件的资料请参考 VB6 中 MSDN 的以下章节
Internet Client SDK
Internet Tools & Technologies
Reusing the WebBrowser and MSHTML

内容来自dedecms

inet401/help/itt/ieprog/IEProg.htm#book_browsing(BOOKMARK)

copyright dedecms

copyright dedecms

  

看完这篇,您有何感觉呢?

文章评论

共有位Admini5网友发表了评论 查看完整内容

24小时热门信息