Get ip from external txt file and use in vbscript
hi everybody,
i have a little problem but iam sure its very easy stuff for u guys.
I want to recieve the ip adress from an external txt file on my server (192.168.1.101/ip.txt)
externaltxtip= ' example: "http://148.102.73.247:7476/"
i dont really want to save the file on my pc. i just want the content and past it after externaltxtip=
how can i do that
and should i write
"http://148.102.73.247:7476/"
or just
http://148.102.73.247:7476/
thanks in advance.
i have a little problem but iam sure its very easy stuff for u guys.
I want to recieve the ip adress from an external txt file on my server (192.168.1.101/ip.txt)
externaltxtip= ' example: "http://148.102.73.247:7476/"
i dont really want to save the file on my pc. i just want the content and past it after externaltxtip=
how can i do that
and should i write
"http://148.102.73.247:7476/"
or just
http://148.102.73.247:7476/
thanks in advance.
Bitte markiere auch die Kommentare, die zur Lösung des Beitrags beigetragen haben
Content-ID: 321844
Url: https://administrator.de/forum/get-ip-from-external-txt-file-and-use-in-vbscript-321844.html
Ausgedruckt am: 20.04.2025 um 07:04 Uhr
5 Kommentare
Neuester Kommentar

strIP = DownloadString("http://192.168.2.101/ip.txt")
Msgbox strIP
Function DownloadString(strURL)
Dim objhttp
Set objhttp = CreateObject("Microsoft.XMLHTTP")
With objhttp
.Open "GET", strURL, False
.send
If .Status = 200 Then
DownloadString = .responseText
Else
DownloadString = ""
End If
End With
End Function