v0isittex pistää valmista koodii,en o mikää kooderi. Eli ei toimi siis mitkään hakusanoilla "vb.net send postdata". Oliskoha linkkejä toimiviin pätkäesimerkkeihin?
No morjens raakile!
ohessa simppeli esimerkki...
Private Sub Button1_Click(ByVal sender As System.Object, _ ByVal e As. System.EventArgs) Handles Button1.Click Dim URL As String = "https://www.ohjelmointiputka.net/" Dim postData As String = _ "krnimi=[k]tunnuksesi[/k]&krss=[k]salasanasi[/k]" Dim request As System.Net.HttpWebRequest = _ System.Net.WebRequest.Create(URL + "sisaan.php") request.UserAgent = _ "Mozilla/5.0 (Windows; U; Windows NT 5.1; fi; rv:1.9.0.5) " & _ "Gecko/2008120122 Firefox/3.0.5 (.NET CLR 3.5.30729)" request.Method = "POST" request.AllowAutoRedirect = False request.ContentType = "application/x-www-form-urlencoded" request.ContentLength = postData.Length Dim requestStream As System.IO.Stream = request.GetRequestStream() Dim postBytes As Byte() = _ System.Text.Encoding.Default.GetBytes(postData) requestStream.Write(postBytes, 0, postBytes.Length) requestStream.Close() Dim response As System.Net.HttpWebResponse = request.GetResponse() Response.Close() MsgBox(response.Headers.ToString) End Sub
Kiitti.
Aihe on jo aika vanha, joten et voi enää vastata siihen.