Im trying to replicate the following in php although i am stuck at Encoding.ASCII.GetBytes(paramList)
HttpWebRequest req = (HttpWebRequest)WebRequest.Create(url);
req.Method = "POST";
req.ContentType = "application/x-www-form-urlencoded";
string paramList = "paramList=ThruDate_" + thruDate.ToString() + "|OwnerLevel_" + ownerLevel;
Stream stream = req.GetRequestStream();
byte[] bytes = Encoding.ASCII.GetBytes(paramList);
stream.Write(bytes, 0, bytes.Length);
stream.Close();
There’s no need to get an array of bytes in order to send POST data to some http server when using php.
see also:
http://docs.php.net/file_get_contents
http://docs.php.net/context.http