Usuário com melhor resposta
Obter texto de um ficheiro online .php

Pergunta
-
Olá a todos, Tudo bem?
Estou a fazer um updater para um programa sem ser com o OnceClick (acho que é assim). Para tal na minha conta 000webhost criei 2 ficheiros.
1- Vai conter o link de download do novo ficheiro
2- vai conter a versão mais recente
Meu objetivo é ter o link numa textbox ou Label. Como faço?
Tentei:
WithEvents Cliente As New WebClient Dim versãoagora As String = "0.0.0.1" Dim Link As New WebClient Dim baixar As String = Link.DownloadString("http://updates.esjfa-10a.freeiz.com/Alunos/Teste.htm") TextBox1.Text = baixar ' mas o que fica na textbox é 'http://205.196.123.201/oaadcq2ohpcg/969943rc51su6l1/Hyrokumata.NotePad2.3.exe '<!-- Hosting24 Analytics Code --> '<script type="text/javascript" 'src="http://stats.hosting24.com/count.php"></script> '<!-- End Of Analytics Code -->
Alguem me ajuda?
Meu novo programa (Bloco de Notas) http://hyrokumata-app.blogspot.pt/2012/07/notepad-3-beta.html
Respostas
-
Peço imensa desculpa mas ja resolvi
Imports System.Net Public Class Start WithEvents Cliente As New WebClient Dim versãoagora As String = "0.0.0.1" Dim download As New WebClient Dim Link As New WebClient Private Sub Start_Load(sender As Object, e As EventArgs) Handles MyBase.Load PictureBox1.ImageLocation = "C:\ProgramData\Microsoft\User Account Pictures\user.bmp" Label2.Text = SystemInformation.UserName Dim update As String = Cliente.DownloadString("http://updates.esjfa-10a.freeiz.com/Alunos/Version.php") If versãoagora >= update Then Label4.Text = "sem update" Else Label4.Text = "Novo update" End If Dim baixar As String = Link.DownloadString("http://updates.esjfa-10a.freeiz.com/Alunos/Linkdownload.php") download.DownloadFileAsync(New Uri(baixar), My.Computer.FileSystem.SpecialDirectories.Desktop & "\Teste10.exe")
Meu novo programa (Bloco de Notas) http://hyrokumata-app.blogspot.pt/2012/07/notepad-3-beta.html
- Marcado como Resposta Gustavo M. GuimarãesModerator segunda-feira, 17 de dezembro de 2012 17:02
-
Já resolvi. Tanto drama para nada. Como excluo-o a postagem? ou deixo ficar?
Imports System.Net Public Class Start WithEvents Cliente As New WebClient Dim versãoagora As String = "0.0.0.1" Dim download As New WebClient Dim Link As New WebClient Private Sub Start_Load(sender As Object, e As EventArgs) Handles MyBase.Load PictureBox1.ImageLocation = "C:\ProgramData\Microsoft\User Account Pictures\user.bmp" Label2.Text = SystemInformation.UserName Dim update As String = Cliente.DownloadString("http://updates.esjfa-10a.freeiz.com/Alunos/Version.php") If versãoagora >= update Then Label4.Text = "sem update" Else Label4.Text = "Novo update" End If Dim baixar As String = Link.DownloadString("http://updates.esjfa-10a.freeiz.com/Alunos/Linkdownload.php") download.DownloadFileAsync(New Uri(baixar), My.Computer.FileSystem.SpecialDirectories.Desktop & "\Teste10.exe")
Meu novo programa (Bloco de Notas) http://hyrokumata-app.blogspot.pt/2012/07/notepad-3-beta.html
- Marcado como Resposta Gustavo M. GuimarãesModerator segunda-feira, 17 de dezembro de 2012 17:02
Todas as Respostas
-
Peço imensa desculpa mas ja resolvi
Imports System.Net Public Class Start WithEvents Cliente As New WebClient Dim versãoagora As String = "0.0.0.1" Dim download As New WebClient Dim Link As New WebClient Private Sub Start_Load(sender As Object, e As EventArgs) Handles MyBase.Load PictureBox1.ImageLocation = "C:\ProgramData\Microsoft\User Account Pictures\user.bmp" Label2.Text = SystemInformation.UserName Dim update As String = Cliente.DownloadString("http://updates.esjfa-10a.freeiz.com/Alunos/Version.php") If versãoagora >= update Then Label4.Text = "sem update" Else Label4.Text = "Novo update" End If Dim baixar As String = Link.DownloadString("http://updates.esjfa-10a.freeiz.com/Alunos/Linkdownload.php") download.DownloadFileAsync(New Uri(baixar), My.Computer.FileSystem.SpecialDirectories.Desktop & "\Teste10.exe")
Meu novo programa (Bloco de Notas) http://hyrokumata-app.blogspot.pt/2012/07/notepad-3-beta.html
- Marcado como Resposta Gustavo M. GuimarãesModerator segunda-feira, 17 de dezembro de 2012 17:02
-
Já resolvi. Tanto drama para nada. Como excluo-o a postagem? ou deixo ficar?
Imports System.Net Public Class Start WithEvents Cliente As New WebClient Dim versãoagora As String = "0.0.0.1" Dim download As New WebClient Dim Link As New WebClient Private Sub Start_Load(sender As Object, e As EventArgs) Handles MyBase.Load PictureBox1.ImageLocation = "C:\ProgramData\Microsoft\User Account Pictures\user.bmp" Label2.Text = SystemInformation.UserName Dim update As String = Cliente.DownloadString("http://updates.esjfa-10a.freeiz.com/Alunos/Version.php") If versãoagora >= update Then Label4.Text = "sem update" Else Label4.Text = "Novo update" End If Dim baixar As String = Link.DownloadString("http://updates.esjfa-10a.freeiz.com/Alunos/Linkdownload.php") download.DownloadFileAsync(New Uri(baixar), My.Computer.FileSystem.SpecialDirectories.Desktop & "\Teste10.exe")
Meu novo programa (Bloco de Notas) http://hyrokumata-app.blogspot.pt/2012/07/notepad-3-beta.html
- Marcado como Resposta Gustavo M. GuimarãesModerator segunda-feira, 17 de dezembro de 2012 17:02