Hola tengo un problema en visual basic
lo que necesito es descargar una archivo de texto .txt desde mediafire
el archivo solo tiene tres nombres ejemplo.
Luis
Mari
Juan
Pero el problema es al descargar el txt me descarga en ves de traer los nombres me muestra codigo HTML ejemplo.
<!DOCTYPE html> <html lang="en-US" xmlns:fb="http://www.facebook.com/2008/fbml" xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"/> <title>Setup</title> <META NAME="keywords" CONTENT="online storage, free storage, cloud Storage, collaboration, backup file Sharing, share Files, photo backup, photo sharing, ftp replacement, cross platform, remote access, mobile access, send large files, recover files, file versioning, undelete, Windows, PC, Mac, OS X, Linux, iPhone, iPad, Android"/> <META NAME="description" CONTENT="MediaFire is a simple to use free service that lets you put all your photos, documents, music, and video in a single place so you can access them anywhere and share them everywhere."/> <META NAME="ROBOTS" CONTENT="NOINDEX,FOLLOW"/> <META NAME="GOOGLEBOT" CONTENT="NOINDEX,FOLLOW"/> <META NAME="SLURP" CONTENT="NOINDEX,FOLLOW"/> <meta http-equiv="Cache-Control" content="no-store, no-cache, must-revalidate, post-check=0, pre-check=0"/> <meta http-equiv="Pragma" content="no-cache"/> <meta http-equiv="Expires" content="0"/> <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"/> <meta property="og:image" content="" />
<meta property="twitter:image" content="" />
<meta property="og:title" content="Setup.txt" />
<meta property="twitter:title" content="Setup.txt" />
<meta property="og:description" content="MediaFire is a simple to use free service for that lets you put all your photos, documents, music, and video in a single place so you can access them anywhere and share them everywhere." />
<meta property="twitter:description" content="MediaFire is a simple to use free service for that lets you put all your photos, documents, music, and video in a single place so you can access them anywhere and share them everywhere." />
<meta property="og:type" content="website"/> <meta property="og:site_name" content="MediaFire"/> <meta property="og:url" content="http://www.mediafire.com/view/geeimh6sa2i6k9m/Setup.txt"/> <meta property="fb:app_id" content="124578887583575"/> <meta name="apple-itunes-app" content="app-id=555646196"/> <link href="https://cdnssl.mediafire.com/css/mfv3_108368.php?ver=nonssl" rel="stylesheet" type="text/css"/> <link href="https://cdnssl.mediafire.com/css/mfv4_108368.php?ver=nonssl&date=2014-06-12" rel="stylesheet" type="text/css"/> <link href="https://cdnssl.mediafire.com/css/fileview.css_108368.php?ver=nonssl" rel="stylesheet" type="text/css" />
<link href='https://fonts.googleapis.com/css?family=Open+Sans:800,700,400,300' rel='stylesheet' type='text/css'/> <!--[if lte IE 8]> <link rel="stylesheet" type="text/css" href="https://cdnssl.mediafire.com/css/ie_108368.css?ver=nonssl"/> <![endif]--> <!--[if lt IE 7]> <link rel="stylesheet" type="text/css" href="https://cdnssl.mediafire.com/css/ie6_108368.css?ver=nonssl"/> <![endif]--> <!--[if IE 7]> <link rel="stylesheet" type="text/css" href="https://cdnssl.mediafire.com/css/ie7_108368.css?ver=nonssl"/> <![endif]--> <link rel="SHORTCUT ICON" href="/favicon.ico"/> <script type="text/javascript">var acK= true;var aCH='live';var aWJ= false;function asO(e,qv){var vU=qv+': ';if(e.name){vU+='Error name: "'+e.name+'" ';}if(e.message){vU+='Error message: "'+e.message+'" ';}Ku(5,vU);};var Iu='Free File Sharing and Storage made Simple'; </script> <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.js"></script> <script language="javascript" type="text/javascript">try{if(typeof jQuery=="undefined"){document.write('<scri'+'pt type="text/javascript" src="https://cdnssl.mediafire.com/js/jquery/1.7.2/jquery.js"></sc'+'ript>');}}catch(e){asO(e,'HDR:jquery_check');} </script> <style type="text/css"> #statusmessage{position:fixed;top:200px;} </style> <script type="text/javascript">var JS_LoadTime= 108368;window.onload=function(){Cy();}; </script> <script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-829541-1']);
_gaq.push(['_setCustomVar',1,'UserType','free']);
_gaq.push(['_trackPageview']);
try{
en el proyecto solo tengo un comandbuton y el codigo del formulario es.
Option Explicit
'Funcion API URLDownloadToFile
Private Declare Function URLDownloadToFile _
Lib "urlmon" _
Alias "URLDownloadToFileA" ( _
ByVal pCaller As Long, _
ByVal szURL As String, _
ByVal szFileName As String, _
ByVal dwReserved As Long, _
ByVal lpfnCB As Long) As Long
Private Sub Command1_Click()
Call Descargar("Link de alrchivo")
End Sub
Private Sub Form_Load()
Command1.Caption = "Descargar Texto"
End Sub
Sub Descargar(Url As String)
Me.MousePointer = vbHourglass
'Descargamos el archivo de texto al disco para después cargarla. _
El Primer parámetro es la url y el segundo es el path donde se guarda
Call URLDownloadToFile(0, Url, App.Path & "\Ejemplo.txt", 0, 0)
Me.MousePointer = vbDefault
End Sub
Si algin pudiera tener una solución le agradecería gracias.