L
Lloyd Dupont
there is a PHP file with which I try to communicate.
there is a simple HTML like that:
"<form action='feedback.php' method='POST'>blablabl</form>"
now I try to write some C# code to invoke the PHP from a desktop app, which
look like that:
====================
static HttpWebRequest CreateRequest(string url, string method,
IDictionary<string, string> parameters, Stream data)
{
HttpWebRequest request = (HttpWebRequest)WebRequest.Create(url);
request.Method = method;
foreach (string key in parameters.Keys)
request.Headers.Add(key, parameters[key]);
using (Stream reqStream = request.GetRequestStream())
{
//request.Headers.Add("Content-Length:", reqStream.Length.ToString());
CopyStream(data, reqStream);
}
return request;
}
====================
where URL is the URL of the PHP page.
unfortunately nothin is picked up by the PHP script.
did I miss something?
how do I submit multiple file btw?
there is a simple HTML like that:
"<form action='feedback.php' method='POST'>blablabl</form>"
now I try to write some C# code to invoke the PHP from a desktop app, which
look like that:
====================
static HttpWebRequest CreateRequest(string url, string method,
IDictionary<string, string> parameters, Stream data)
{
HttpWebRequest request = (HttpWebRequest)WebRequest.Create(url);
request.Method = method;
foreach (string key in parameters.Keys)
request.Headers.Add(key, parameters[key]);
using (Stream reqStream = request.GetRequestStream())
{
//request.Headers.Add("Content-Length:", reqStream.Length.ToString());
CopyStream(data, reqStream);
}
return request;
}
====================
where URL is the URL of the PHP page.
unfortunately nothin is picked up by the PHP script.
did I miss something?
how do I submit multiple file btw?