[Basic Tut] Download String
What?
This program will download a file (.txt or .php) from a FTP Server and put its content to use!
Why?
So you can check for updates, find peoples IP, get strings... Really anything that can be written down...
How?
Over the internet... You just need an FTP Server...
Just Google "Free FTP hosting" as outside links aren't allowed.
I want to make it check for updates!!!
You will need upload a .txt file to your FTP Server with the latest version written inside.
Example:
Code:
v1.0
A way you can do this is to get the IP's of the people that you want to use your program.
Create a .php file with the following code and host it on your server.
Code:
<?php echo $_SERVER['REMOTE_ADDR']; ?>
Add 1 WebClient to your form.
Add this code to your project load page and it will check for updates. Alternatively you can add it to a button.
Code:
If Not System.Text.Encoding.ASCII.GetString((WebClient1.DownloadData("http://yourfileurl.com/version.txt"))) = "v1.0" Then
MsgBox("An update is availible")
End If
Code:
Dim UserIP As String = System.Text.Encoding.ASCII.GetString((WebClient1.DownloadData("http://yourfileurl.com/ip.php")))
If UserIP = "IP1" Then
ElseIf UserIP = "IP2" Then
ElseIf UserIP = "IP3" Then
ElseIf UserIP = "IP4" Then
Else
MsgBox("Your IP is not authorized to use this program" & vbNewLine & "The program will now close.", MsgBoxStyle.Exclamation, "Not Authorized!")
End
End If

If you would like to see some other features, PM me.


