How do i write to txtfile online ??

ghostpally

Member
Joined
Jan 19, 2008
Messages
23
Programming Experience
Beginner
I have this code to read from a text file
VB.NET:
 Dim key As String
        key = Me.TextBox1.Text & "-" & Me.TextBox2.Text & "-" & Me.TextBox3.Text & "-" & Me.TextBox4.Text
        Dim url As String = "http://www.freewebs.com/ghostpallyab/ABKeys.txt"

        Dim ol As String
        Dim WebResponse As Net.WebResponse = Net.WebRequest.Create(url).GetResponse
        Dim StreamReader As New IO.StreamReader(WebResponse.GetResponseStream())
        Dim sr As New IO.StreamWriter("AB.dll", False)
        Dim test As Boolean = False
        Do
            ol = StreamReader.ReadLine
            If ol = key Then
                test = True
                sr.WriteLine("fsd34934d")
                MsgBox("Key Good")
                Me.Hide()
                Form1.Enabled = True
                sr.Close()
            Else
                test = False
            End If
        Loop While StreamReader.Peek <> -1
        StreamReader.Close()
        If test = False Then
            MsgBox("Bad Key")
            Application.Exit()
        End If

    End Sub
but after the user enters their key i would like to know how to write the key in to a file that way i can remove the key after so no one can use the same key.
 
How do i write to txtfile online ??
Read about some upload options.

Better is to have a server application (ASP.Net or Webservice) that is operating at that machine handing out and/or verifying licences.
 
Back
Top