user3185644 user3185644 - 6 months ago 47
Vb.net Question

Read Dropbox txt File

Well i am trying to make a Register and have this code

Dim webs As New Net.WebClient
Dim reader As StreamReader = New StreamReader(client.OpenRead(https://www.dropbox.com/s/wvobcpniczdx1s0/regList.txt)

Private Sub cmdRegister_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdRegister.Click
If TextBox1.Text + TextBox2.Text + TextBox3.Text + TextBox4.Text = reader.ReadToEnd Then
MsgBox("You have Registered Succesfully")
Else
MsgBox("You Failed To register")
End If
End Sub


What im trying to do is make it read the dropbox .txt file and say, if the 4 text boxes all add up to the dropbox txtfile then it will register succesfully

in the dropbox the registration key is "aaaaabbbbbcccccddddd"
and when i put it in 5 digits in the 4 boxes it says failed (n)

the only way it works if i do all the 4 boxes add up to = "aaaaabbbbbcccccddddd"

Answer

You cant read the Dropbox txt like this. I found out, that if ther is a not fitting parameter, dropbox gives out the raw file. just use the url and add anything like this:

https://dl.dropboxusercontent.com/s/wvobcpniczdx1s0/regList.txt?insert_anything_you_want

But watch out of the ?!