FTP | CCD | Buscar | Trucos | Trabajo | Foros |
|
Registrarse | FAQ | Miembros | Calendario | Guía de estilo | Temas de Hoy |
|
Herramientas | Buscar en Tema | Desplegado |
#1
|
|||
|
|||
descarga de URL
Hola!
Tengo este código en asp. Mi finalidad es poder bajarme una pagina .htm sin que esta se abra. <<A href="mailto:%@LANGUAGE="VBSCRIPT">%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <title>Documento sin título</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> </head> <body> <% sub get_html (up_http, down_http) ' Uso el objeto XMLHTTP dim xmlhttp set xmlhttp = createobject("msxml2.xmlhttp.3.0") ' Abro el fichero de la url xmlhttp.open "get", up_http, false xmlhttp.send dim fso ' Me preparo para guardarlo. set fso = createobject ("Scripting.FileSystemObject") ' Lo guardo dim newfile set newfile = fso.CreateTextFile("c:\tmp\pepe.htm", true) newfile.write (xmlhttp.responseText) newfile.close set newfile = nothing set xmlhttp = nothing end sub get_html "http://www.midominio.com/pruebas/prueba.htm","c:\tmp\pepe.htm" %> </body> </html> Pero en el momento en que intento guarda el fichero, me da error en la linea: set newfile = fso.CreateTextFile("c:\tmp\pepe.htm", true) Me dice: Permiso denegado. Si alguien sabe que puede pasar o tiene alguna idea para conseguir lo que quiero hacer, le estaría muy agradecido. |
#2
|
|||
|
|||
perdón
No sale el código que he puesto.
ver ahora. <% sub get_html (up_http, down_http) dim xmlhttp set xmlhttp = createobject("msxml2.xmlhttp.3.0") xmlhttp.open "get", up_http, false xmlhttp.send dim fso set fso = createobject ("Scripting.FileSystemObject") dim newfile set newfile = fso.CreateTextFile("c:\tmp\pepe.htm", true) newfile.write (xmlhttp.responseText) newfile.close set newfile = nothing set xmlhttp = nothing end sub get_html "http://www.midominio.com/pruebas/prueba.htm", "c:\tmp\pepe.htm" %> |
|
|
Temas Similares | ||||
Tema | Autor | Foro | Respuestas | Último mensaje |
Descarga FTP | Luis Alberto | Internet | 26 | 20-03-2012 18:51:47 |
Descarga de Kylix3 | samuelabad | Lazarus, FreePascal, Kylix, etc. | 39 | 10-09-2007 11:50:34 |
Validar una descarga | arespremium | PHP | 1 | 28-08-2007 23:45:50 |
link de descarga por SMS? | d-hugo | Varios | 0 | 26-04-2007 22:27:29 |
Descarga BDE | Tejares | Conexión con bases de datos | 5 | 13-06-2006 11:29:22 |
|