0
我复制了这个脚本from here,但我不知道如何修改它以使它只是将url作为GET请求调用 - 但我不需要它根据url的响应来编写任何文件输出。该脚本只需要请求url(使用GET方法)就需要什么?
script.vbs
sSrcUrl = "http://localhost:8080/trigger_url"
sDestFolder = "D:\script\"
sImageFile = "output.txt"
set oHTTP = WScript.CreateObject("MSXML2.ServerXMLHTTP")
oHTTP.open "GET", sSrcUrl, False
oHTTP.send ""
set oStream = createobject("adodb.stream")
Const adTypeBinary = 1
Const adSaveCreateOverWrite = 2
oStream.type = adTypeBinary
oStream.open
oStream.write oHTTP.responseBody
oStream.savetofile sDestFolder & sImageFile, adSaveCreateOverWrite
set oStream = nothing
set oHTTP = nothing
什么是最小,此脚本需要只是ping通网址是什么?
您的术语相当遥远,您无法“ping”一个URL,但如果您想要检查它是否存在,则可以将GET更改为HEAD。 – tripleee