Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Need help, reading remote html files

Status
Not open for further replies.

andnos

Technical User
Nov 21, 2005
48
US
I'm new to ASP/VBScript and I need to open a remote web page and read the contents of that page and display it in my asp page, any ideas on how to do this best?

Andy
 
here is the complete code for you:

Code:
dim objXMLHTTP,yourfile

yourfile="myfile.csv"
DestFolder = "./"

URL = "your URL here/" &yourfile

set objXMLHTTP = CreateObject("Msxml2.ServerXMLHTTP.4.0")


objXMLHTTP.Open "GET", URL, False
objXMLHTTP.Send 


set oStream = createobject("Adodb.Stream")
Const adTypeBinary = 1
Const adSaveCreateOverWrite = 2
Const adSaveCreateNotExist = 1

oStream.type = adTypeBinary
oStream.open
oStream.write objXMLHTTP.responseBody


oStream.savetofile DestFolder & yourfile, adSaveCreateNotExist

oStream.close

set oStream = nothing
Set objXMLHTTP = Nothing

also refer to my other thread thread333-1114192

-DNG
 
Thanks, you guys are really quick, I think this is going to work great.
 
no problem, glad to help...post back if you have any questions...

-DNG
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top