Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP General > save remote image to my server

Reply
Thread Tools

save remote image to my server

 
 
Tim
Guest
Posts: n/a
 
      11-28-2005
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

 
Reply With Quote
 
 
 
 
McKirahan
Guest
Posts: n/a
 
      11-28-2005
"Tim" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed) 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."
%>


 
Reply With Quote
 
 
 
 
McKirahan
Guest
Posts: n/a
 
      11-28-2005
"McKirahan" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed). ..
> "Tim" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed) 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


 
Reply With Quote
 
McKirahan
Guest
Posts: n/a
 
      11-28-2005
"McKirahan" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed). ..
> "McKirahan" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed). ..
> > "Tim" <(E-Mail Removed)> wrote in message
> > news:(E-Mail Removed) 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 !


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to save an XML Doc in remote server T.Jeywin Lizy ASP .Net 4 04-09-2009 06:36 AM
upload multiple image to server from remote server RichB ASP .Net 4 03-20-2008 01:58 AM
How to save High Quality JPG image by setting Image module from PIL Daniel Mark Python 1 09-25-2006 05:59 PM
Remote Assistance fails to connect, remote remote host name could not be resolved Peter Sale Wireless Networking 1 12-11-2004 09:09 PM
How To Browse for an image file and save it to image server folder Mike John ASP .Net 0 07-28-2003 04:55 PM



Advertisments