Conversione vb6 to .net di request

venerdì 17 ottobre 2008 - 12.04

Rafnet Profilo | Newbie

Questo il codice vb6

str = Crypt.CriptaStringa(Login & "GETMESS" & Password)
str = "id=" & Login & "&password=" & _
Password & "&operation=GETMESS&ticket=" & str

objHttp.Open "POST", "http://pippo.pippo.it/"
objHttp.setRequestHeader "Content-type", "application/x-www-form-urlencoded"
objHttp.setRequestHeader "Host", "pippo.pippo.it"
objHttp.setRequestHeader "User-Agent", "phppippo/1.3.1"
objHttp.Send (str)

Sono arrivato a creare in c#

HttpWebRequest objXML = (HttpWebRequest)WebRequest.Create("http://pippo.pippo.it/");
objXML.ContentType = "application/x-www-form-urlencoded";
objXML.Method = "POST";
objXML.UserAgent = "phppippo/1.3.1";
objXML.Proxy = new WebProxy("http://pippo.pippo.it/");

HttpWebResponse strResponse = (HttpWebResponse)objXML.GetResponse();


non capisco come passargli il parametro str.

Grazie.
Partecipa anche tu! Registrati!
Hai bisogno di aiuto ?
Perchè non ti registri subito?

Dopo esserti registrato potrai chiedere
aiuto sul nostro Forum oppure aiutare gli altri

Consulta le Stanze disponibili.

Registrati ora !
Copyright © dotNetHell.it 2002-2024
Running on Windows Server 2008 R2 Standard, SQL Server 2012 & ASP.NET 3.5