Pagina 1 di 2 1 2 ultimoultimo
Visualizzazione dei risultati da 1 a 10 su 15
  1. #1

    Copia file da un server ad un altro server

    Come faccio a copiare un file che sta in un server es.www.xxx.it/image
    in un altro es.www.yyy.it/img
    spero che abbiate capito che qualcuno riesca ad aiutarmi

    grazie

  2. #2
    da yyy leggi il file che sta su xxx e lo salvi

  3. #3

  4. #4
    argomento gia' trattatto. cerca XMLHTTP (per la lettura) e FSO (per la scrittura)

  5. #5
    Ma con xmlhttp come faccio a fargli leggere un immagine io riesco ad aprire un file.htm e salvarlo in una variabile e poi con fso come faccio a salvare l'immagine?

  6. #6

  7. #7
    non posso scrivere così:

    url = "http://www.miosito.com/img/foto.jpg"
    Set xmlhttp = Server.CreateObject("MSXML2.ServerXMLHTTP")
    xmlhttp.Open "get", url, False
    xmlhttp.Send
    foto = CStr(xmlhttp.ResponseText)
    fotostatus = xmlhttp.Status
    'response.write foto
    Set xmlhttp = Nothing

    perchè mi da quest'errore

    get to /locand/staizitto.jpg not supported.

    e per salvare come uso fso?

    Dim objFSO, objTextFile
    Set objFSO = CreateObject("Scripting.FileSystemObject")
    Set objTextFile = objFSO.SaveToFile(Server.MapPath("/image"))
    objTextFile.Close
    Set objTextFile = Nothing
    Set objFSO = Nothing

    così come faccio a dargli la variabile foto?

  8. #8
    Non c'è nessuno che mi sa aiutare?

  9. #9

  10. #10
    Utente bannato
    Registrato dal
    Oct 2003
    Messaggi
    372
    è stato trattato pochi giorni fa
    codice:
    <%
    set richiesta = server.CreateObject("MSXML2.ServerXMLHTTP")
       	richiesta.Open "get", "http://forum.html.it/forum/images/reply.gif", false
       	richiesta.Send()
      	ax=richiesta.responseBody
    set richiesta = nothing
       
    Set objStream = Server.CreateObject("ADODB.Stream")
    	objStream.Type = 1
    	objStream.Open
    	objStream.write(ax)
    	objStream.savetoFile(server.MapPath("file2.gif"))
    	objStream.Close
    Set objStream = Nothing
    %>

Permessi di invio

  • Non puoi inserire discussioni
  • Non puoi inserire repliche
  • Non puoi inserire allegati
  • Non puoi modificare i tuoi messaggi
  •  
Powered by vBulletin® Version 4.2.1
Copyright © 2024 vBulletin Solutions, Inc. All rights reserved.