Salve,
ho un problema con l'invio tramite questo script, la pagina "sendsms.php" come test ho messo uno script che scrive in un TXT tutte le variabili POST che gli arrivano e i loro valori, tutto ok, solo che il valore se contiene certi caratteri tipo il segno dell'addizione +, non li scrive, io credo che non arrivano proprio.
il problema che per altri motivi il segno +, lo davo usare per forza.
cosa devo fare per fare in modo che arrivi ???
codice:
string URL = @"http://127.0.0.1/_Test/sendsms.php";
string postData = @"country=0039&" +
"num=" + txtNum.Text + "&" +
"msg=" + txtMsg.Text;
HttpWebRequest request = (HttpWebRequest)WebRequest.Create(URL);
request.Accept = @"text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8";
request.UserAgent = @" Mozilla/5.0 (Windows; U; Windows NT 6.1; it; rv:1.9.2.18) Gecko/20110614 Firefox/3.6.18";
request.AllowAutoRedirect = true;
request.Method = "POST";
byte[] byteArray = Encoding.UTF8.GetBytes(postData);
request.ContentType = "application/x-www-form-urlencoded";
request.ContentLength = postData.Length;
Stream dataStream = request.GetRequestStream();
dataStream.Write(byteArray, 0, byteArray.Length);
dataStream.Close();