logicmedia
asked on
Copy file from URL to my webserver
A simpel question:
Say I have an URL to an image e.g. www.easyblog.dk/DSC00603.jpg. How do I "copy" that imagefile an save it on my webserver using normal ASP
- thomas
Say I have an URL to an image e.g. www.easyblog.dk/DSC00603.jpg. How do I "copy" that imagefile an save it on my webserver using normal ASP
- thomas
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
yeah it'S the same thing
an upload script can do the trick, u have just to specify the file location (local or on the internet) in your case the file is already on the internet
an upload script can do the trick, u have just to specify the file location (local or on the internet) in your case the file is already on the internet
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Okay I found a way... The upload thing seemed overkill and requires the use of a component on the webserver. So in my search for components on my webserver I found the aspHTTP component. It does the job easily:
Set HttpObj = Server.CreateObject("AspHT TP.Conn")
HttpObj.Url = arrImg(i)
HttpObj.FollowRedirects = True
HttpObj.RequestMethod = "GET"
HttpObj.UserAgent = "Mozilla/4.0 (compatible; MSIE 5.0; Windows NT; DigExt)"
HTTPObj.SaveFileTo = server.MapPath(filepath & filename)
HttpObj.GetURL
Set HttpObj = nothing
And its saved...
I'm handing out the points anyways - gonna split them.
Thanks for your time guys...
Set HttpObj = Server.CreateObject("AspHT
HttpObj.Url = arrImg(i)
HttpObj.FollowRedirects = True
HttpObj.RequestMethod = "GET"
HttpObj.UserAgent = "Mozilla/4.0 (compatible; MSIE 5.0; Windows NT; DigExt)"
HTTPObj.SaveFileTo = server.MapPath(filepath & filename)
HttpObj.GetURL
Set HttpObj = nothing
And its saved...
I'm handing out the points anyways - gonna split them.
Thanks for your time guys...
thx for points,
and thx for sharing your solution :))
and thx for sharing your solution :))
ASKER