find external IP and external hostname
4
find external IP and external hostname with vbscript
On Error Resume Next
Const conURLSrc = "http://checkip.dyndns.org/"
Set http = createobject("microsoft.xmlhttp")
Set fso = CreateObject("Scripting.FileSystemObject")
http.open "GET",conURLSrc,False
http.send
htmlIP = http.responsetext
Set regEx = new RegExp
regEx.Global = True
Regex.pattern = "Current IP Address: ([0-9\.]*)"
result = regEx.Test(htmlIP)
Set Matches = regEx.Execute(htmlIP)
For Each Match in Matches
extIP = match.subMatches(0)
Next
Regex.pattern = "Hostname: ([^\s<]*)"
result = regEx.Test(htmlIP)
Set Matches = regEx.Execute(htmlIP)
extHostname = ""
For each Match in Matches
extHostname = match.subMatches(0)
Next






There are currently no comments for this snippet.