
26/08/2009, 00:46
|
 | | | Fecha de Ingreso: agosto-2008 Ubicación: En internet
Mensajes: 2.511
Antigüedad: 16 años, 5 meses Puntos: 188 | |
Respuesta: Proceso para copiar imagenes desde url Bueno, este es un ejemplo hecho con XMLHTTP con una URL que contiene una imagen. Analízalo y cambia lo que necesites. Crear un botón y el lugar donde se pone la lista de imágenes, y leerlas y pasarlas a la variable correspondiente para incrustarlas luego en la ejecución de la función ya es cosa tuya. Suerte.
Function BinaryToString(Binary)
Dim I, S
For I = 1 To LenB(Binary)
S = S & Chr(AscB(MidB(Binary, I, 1)))
Next
BinaryToString = S
End Function
Dim xml, objFS, archivo, simagen
Response.Buffer = True
simagen = "http://www.dominio.com/imagen.jpg"
Set xml = Server.CreateObject("Microsoft.XMLHTTP")
xml.Open "GET", simagen, False
xml.Send
Set ObjFS = CreateObject("Scripting.FileSystemObject")
Set archivo = ObjFS.CreateTextFile
("c:\CarpetaServidor\Imagenes\imagen.jpg", true)
archivo.WriteLine BinaryToString(xml.responseBody)
archivo.Close
Set xml = Nothing
Set archivo = Nothing
Set ObjFS = Nothing
%> |