Forum Moderators: open

Message Too Old, No Replies

Requesting files from other servers in asp?

Can a server download a file from another server and store it?

         

jgar

6:50 pm on Mar 1, 2003 (gmt 0)

10+ Year Member



Is it possible to write VBScript code to download a file from another server and store it?

hakre

7:11 pm on Mar 1, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



hi jgar,

i don't know if it's possible in vbscript but i know there is a workaround with wininet.dll. search for wininet.dll, interneturlopen and vb in google and i'm shure you'll find some code on it. if not, please report.

gelnd

12:00 am on Mar 4, 2003 (gmt 0)

10+ Year Member



I think this is what you're looking for.

[msdn.microsoft.com...]

hakre

12:29 am on Mar 4, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



hi gelnd, welcome to webmasterworld.

the link you posted is for the xml framework only. here is an indeep article for asp or vb to use the functions i proposed in my answer above:

How to use a sync/async Retrieve HTTP component in your ASP & VB projects. [codeproject.com]

macrost

4:46 pm on Mar 4, 2003 (gmt 0)

10+ Year Member



Hakre,
He could use in vbscript the xmlhttp object. basically he could 'scrape' right to the location and then response.binarywrite what type of file he's after. I can't find the code I wrote that does it though. I will look for it today.
Mac

jgar

5:20 pm on Mar 4, 2003 (gmt 0)

10+ Year Member



Thanks for these replies.

This is beginning to go a little over my head, so maybe I should be take a minute to explain a little more about the challenge, before enquiring further:

CURRENT SITUATION
A form on the client page references another server, and that server then returns a "unique for that user" file (with a unique name) to the client browser, which the user can then save to their hard-drive.

DESIRED SITUATION
What we would like to do is somehow make that same <form action="xxxx"> command from the server side, download the file(we don't know what the filename will be) to the server, save it, and then deliver it to the client as required.

I hope this makes sense.

Jgar