Re: Using wininet over http to get a get.cgi file
- From: noone@xxxxxxx (Reventlov)
- Date: Mon, 16 Jun 2008 21:18:27 GMT
Il giorno Fri, 13 Jun 2008 02:36:21 -0700 (PDT), Skylan <bas.van.lieshout@xxxxxxx> ha
scritto:
Hello, I want to access a projector over the network with a vb script
so I can read the lamp hours and status. Can someone help me with some
examples with wininet? I made a search (google as well as Microsoft)
but I can not get it in a vbscript.
I use mshtml.
Sub DownloadWithXMLHTTP (sSource,sDest)
'Download a file using activeX Object XMLHTTP
'and save to sDest using ADO Stream
set oHTTP = WScript.CreateObject("Microsoft.XMLHTTP")
oHTTP.open "GET", sSource, False
oHTTP.send
set oStream = createobject("adodb.stream")
Const adTypeBinary = 1
Const adSaveCreateNotExist = 1
Const adSaveCreateOverWrite = 2
oStream.type = adTypeBinary
oStream.open
oStream.write oHTTP.responseBody
oStream.savetofile sDest, adSaveCreateOverWrite
set oStream = nothing
set oHTTP = nothing
end sub
--
Giovanni Cenati (Bergamo, Italy)
Write to "Reventlov" at katamail com
http://digilander.libero.it/Cenati (Esempi e programmi in VbScript)
--
.
- Follow-Ups:
- Re: Using wininet over http to get a get.cgi file
- From: Skylan
- Re: Using wininet over http to get a get.cgi file
- References:
- Using wininet over http to get a get.cgi file
- From: Skylan
- Using wininet over http to get a get.cgi file
- Prev by Date: Using wininet over http to get a get.cgi file
- Next by Date: Re: Using wininet over http to get a get.cgi file
- Previous by thread: Using wininet over http to get a get.cgi file
- Next by thread: Re: Using wininet over http to get a get.cgi file
- Index(es):
Relevant Pages
|