473,324 Members | 2,417 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,324 software developers and data experts.

save remote image to my server

Tim
Hi all,

I would like to reference a remote image, such as
http://www.mysite.com/pic.jpg and save it to a local folder such as
c:\pics

Can this be done with ASP?

I have played with many image manipulation components and none of them
perform this fuction.

Thanks in advance

Tim

Nov 28 '05 #1
3 7274
"Tim" <Ci************@gmail.com> wrote in message
news:11*********************@z14g2000cwz.googlegro ups.com...
Hi all,

I would like to reference a remote image, such as
http://www.mysite.com/pic.jpg and save it to a local folder such as
c:\pics

Can this be done with ASP?

I have played with many image manipulation components and none of them
perform this fuction.

Thanks in advance

Tim


Will this help? Watch for word-wrap.
<% Option Explicit
'*
'* Declare Constants
'*
Const cFIL = "pic.jpg"
Const cOUT = "c:\pics\"
Const cURL = "http://www.mysite.com/"
'*
'* Fetch File
'*
Dim objXML
'Set objXML = CreateObject("MSXML2.XMLHTTP")
Set objXML = CreateObject("Microsoft.XMLHTTP")
objXML.Open "GET", cURL & cFIL, False
objXML.Send
Dim binXML
binXML = objXML.ResponseBody
Set objXML = Nothing
'*
'* Save File
'*
Dim objADO
Set objADO = CreateObject("ADODB.Stream")
objADO.Type = 1
objADO.Open
objADO.Write binXML
objADO.SaveToFile cOUT & cFIL,2
Set objADO = Nothing
'*
'* Finish
'*
Response.Write cFIL & " downloaded."
%>
Nov 28 '05 #2
"McKirahan" <Ne**@McKirahan.com> wrote in message
news:BO******************************@comcast.com. ..
"Tim" <Ci************@gmail.com> wrote in message
news:11*********************@z14g2000cwz.googlegro ups.com...
Hi all,

I would like to reference a remote image, such as
http://www.mysite.com/pic.jpg and save it to a local folder such as
c:\pics

Can this be done with ASP?

I have played with many image manipulation components and none of them
perform this fuction.

Thanks in advance

Tim


[snip]

I adapted it from a VBScript and forgot to change
CreateObject
to
Sever.CreateObject
Nov 28 '05 #3
"McKirahan" <Ne**@McKirahan.com> wrote in message
news:JL******************************@comcast.com. ..
"McKirahan" <Ne**@McKirahan.com> wrote in message
news:BO******************************@comcast.com. ..
"Tim" <Ci************@gmail.com> wrote in message
news:11*********************@z14g2000cwz.googlegro ups.com...
Hi all,

I would like to reference a remote image, such as
http://www.mysite.com/pic.jpg and save it to a local folder such as
c:\pics

Can this be done with ASP?

I have played with many image manipulation components and none of them
perform this fuction.

Thanks in advance

Tim


[snip]

I adapted it from a VBScript and forgot to change
CreateObject
to
Sever.CreateObject


Server.CreateObject !
Nov 28 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: ywg | last post by:
I'm generating an image using several PHP image routines: imagecreatefromjpeg, imagejpeg, etc. The PHP file containing these routines is meant to be included on web pages just like regular...
5
by: Graham Mattingley | last post by:
Hello Group, I have been playing with this idea for a month or so, but never really got anywhere.... I want to make a remote counter image, the same as is found on mycounter.com, where people...
5
by: kevin | last post by:
Hi, Any help with this would be really appreciated! I'm trying to download a file from a remote server. The access permissions is okay but the problem I'm facing is that the file is getting...
9
by: Ivan Demkovitch | last post by:
Hi! I would like to know if I can save File on Server using server-side code? For example, I like to create thumbnail images and populate specific directory. Do I need specific permissions...
6
by: Pat Carden | last post by:
Hi, We need to allow webusers to upload a file on our website (on Server3, all servers run Server 2003, remotely hosted) and eventually save it on our SBS Server (Server2) which is not exposed...
4
by: Hrvoje Vrbanc | last post by:
I would like to know the most efficient way to copy an image from an Internet URL to the local hard disk by means of using an ASP.NET page. So, I would like to click the button on the ASP.NET...
3
by: Amie | last post by:
Hi, My .NET application has a script that checks whether an image file on a remote server exists using File.Exists. >From my localhost (Server A), I can access the image file via network path...
2
by: Ada | last post by:
First of all, I thought this might be a directory security issue but it's not. I was able to upload the file to the directory via HTTP. Here's the situation. I have a JPG file on my server....
0
by: Peted | last post by:
I suspect there is a better forum for this question, but i couldnt find it. If someone could point me in the right direction or help me with this question it would be muchly appreciated I have...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.