msg= "Please enter the IP or domain name you want to inquire about:"
Ip=inputbox (msg, "IP location search for thieves")
If IP = "" Then IP = "127.0.0.1"
url = "http://www.ip.cn/?q=" & IP & ""
BODY = gethttppage (URL)
Set Re = New RegExp
Re.pattern = "(query result:. +)"
Set matches = Re.execute (body)
If matches.count>0 Then BODY = Matches (0)
' Re.pattern = ' \[[\s\s]*\] '
' BODY = re.replace (Body, "")
' WScript.Echo IP & Body
Set oxmlhttprequest=nothing
Set objexplorer = WScript.CreateObject ("Internetexplorer.application")
Objexplorer.navigate "About:blank"
Objexplorer.toolbar = 0
Objexplorer.statusbar = 0
objexplorer.visible = 1
objexplorer.height=300
objexplorer.width=400
objexplorer.left=400
Objexplorer.resizable=0
ObjExplorer.Document.Body.InnerHTML =ip & Body
' ObjExplorer.document.parentwindow.clipboardData.SetData ' text ', IP & Body
Set objexplorer=nothing
' Function area
Function Gethttppage (Path)
t = GetBody (Path)
Gethttppage = Bytestobstr (t, "UTF-8")
End Function
Function getbody (URL)
On Error Resume Next
Set retrieval = CreateObject ("Microsoft.XMLHTTP")
With retrieval
. Open "Get", url, False, "", ""
. Send
GetBody =. Responsebody
End With
Set retrieval = Nothing
End Function
Function bytestobstr (body, Cset)
Dim objstream
Set objstream = CreateObject ("ADODB.stream")
Objstream. Type = 1
Objstream. Mode = 3
Objstream. Open
Objstream. Write body
Objstream. Position = 0
Objstream. Type = 2
Objstream. Charset = Cset
Bytestobstr = objstream. ReadText
Objstream. Close
Set objstream = Nothing
End Function
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.