cau, potreboval bych helpnout,,,mam odeslani HTTP pozadavku, to jsem nasel ale nevim jak to funguje ...
private string HttpPost(string URI, string Parameters)
{
System.Net.WebRequest req = System.Net.WebRequest.Create(URI);
req.ContentType = "application/x-www-form-urlencoded";
req.Method = "POST";
byte[] bytes =
System.Text.UTF8Encoding.ASCII.GetBytes(Parameters);
//byte [] bytes =
System.Text.Encoding.ASCII.GetBytes(Parameters);
req.ContentLength = bytes.Length;
System.IO.Stream os =
req.GetRequestStream();
os.Write(bytes, 0, bytes.Length);
os.Close();
System.Net.WebResponse resp =
req.GetResponse();
if (resp == null) return null;
System.IO.StreamReader sr = new
System.IO.StreamReader(resp.GetResponseStream());
return sr.ReadToEnd().Trim();
}
a potom mam jen toto :
private void button1_Click(object sender, EventArgs e)
{
HttpPost("http://necum.cz", "nick=" + YourNick + "&heslo=" + YourHeslo + "); // odesle adresu, a na adrese se tim provede zapsani do databaze : odeslal jste pozadavek z programu ...
}