如何获取上次使用Vbscript编辑外部HTML文档的时间



所以我有一个页面:www.example.com/thing/page.html

我想用Visual Basic编写一个程序,告诉我最后一次编辑那个特定页面的时间。例如:

/thing/page.html: Last edited 1/1/18

有什么办法我能做到这一点吗?

Set File = WScript.CreateObject("Msxml2.XMLHTTP.6.0")
File.Open "GET", "https://www.google.com.au/search?q=cat", False
File.Open "GET", "https://www.mvps.org/serenitymacros/index.html", False
File.setRequestHeader "User-Agent", "Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.0; Trident/4.0; SLCC1; .NET CLR 2.0.50727; Media Center PC 5.0; .NET CLR 1.1.4322; .NET CLR 3.5.30729; .NET CLR 3.0.30618; .NET4.0C; .NET4.0E; BCD2000; BCD2000)"
File.Send
wscript.echo "==================" 
wscript.echo "" 
wscript.echo "Error " & err.number & "(0x" & hex(err.number) & ") " & err.description 
wscript.echo "Source " & err.source 
wscript.echo "" 
wscript.echo "HTTP Error " & File.Status & " " & File.StatusText
wscript.echo    File.getAllResponseHeaders
wscript.echo    File.ResponseBody

如果服务器发送信息,它将出现在响应标头中。

最新更新