Actually i wanted to submit my username and password to a website to check whether its working properly or not. i got this idea when i was learning abt the webclient class in the system.net.. So i decided to check it with the gaming which i have a account on .. Then i coded a bit and created a real mess... Dono whats wrong with this even when i kno the username and password i mentioned are correct.. Kindly Help..plz
Code:Dim checker As New WebClient Dim data As Byte() Dim username As Char Dim password As Char Dim result As Byte() 'Dim aa As String checker.Headers.Add("Content-Type", "application/x-www-form-urlencoded") checker.Headers.Add("User-Agent", "Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.0.11) Gecko/2009060215 Firefox/3.0.11 (.NET CLR 3.5.30729)") data = Encoding.ASCII.GetBytes("ref=https%3A%2F%2Fwww.worldofwarcraft.com%2Faccount%2Fmenu.html&accountName=" + _ username + "&password=" + password) result = checker.UploadData("https://us.battle.net/login/login.xml", "POST", data) 'aa = Encoding.ASCII.GetString(result) If Encoding.ASCII.GetString(result).ToString.Contains("Game Account") Then TextBox1.Text = "accountvalid" Else TextBox1.Text = "account not valid" End If




Reply With Quote