Const conURLSrc = "http://checkip.dyndns.org/"
Const conFilSpec = "externalip.txt"
Dim st(0)
st(0) = "Current IP Address: "
set http = createobject("microsoft.xmlhttp")
set fso = CreateObject("Scripting.FileSystemObject")
set fOutput = fso.CreateTextFile(conFilSpec,true)
' Get HTML from http://checkip.dyndns.org/ page
http.open "GET",conURLSrc,False
http.send
' Create array with each line as an element
aHTML = Split(http.responsetext, vbLf)
for i=0 To UBound(aHTML)
if (Instr(aHTML(i),st(0))>0) then
a = Instr(aHTML(i),st(0)) + len(st(0))
b = Instr(a,aHTML(i),"<br>") - a
fOutput.WriteLine Mid(aHTML(i),a,b)
end if
next
Const conFilSpec = "externalip.txt"
Dim st(0)
st(0) = "Current IP Address: "
set http = createobject("microsoft.xmlhttp")
set fso = CreateObject("Scripting.FileSystemObject")
set fOutput = fso.CreateTextFile(conFilSpec,true)
' Get HTML from http://checkip.dyndns.org/ page
http.open "GET",conURLSrc,False
http.send
' Create array with each line as an element
aHTML = Split(http.responsetext, vbLf)
for i=0 To UBound(aHTML)
if (Instr(aHTML(i),st(0))>0) then
a = Instr(aHTML(i),st(0)) + len(st(0))
b = Instr(a,aHTML(i),"<br>") - a
fOutput.WriteLine Mid(aHTML(i),a,b)
end if
next
do anyone have a clue?
Comment