The cellphone uses the following C# code to send the image to picinput.php
What is the most efficient php code to receive this image and write it to a file on the web server?
Code:
string baseUrl = "http://www.somwhere.com/picinput.php?picfile=" + fileName;
httpWebRequest = (HttpWebRequest)WebRequest.Create(baseUrl);
httpWebRequest.Timeout = 20000;
httpWebRequest.Method = "POST";
httpWebRequest.ContentType = "application/x-www-form-urlencoded";
httpWebRequest.ContentLength = imageData.Length;
using (Stream oStream = httpWebRequest.GetRequestStream())
{
oStream.Write(imageData, 0, imageData.Length);
oStream.Close();
}
Comment