PHP can't get raw data sent as multipart/form-data
<p>This is client code (C#) :</p>

<pre class="lang-c# prettyprint-override"><code>string boundary = "--ABC";

try
{
    WebRequest request = WebRequest.Create(url);
    request.Method = "POST";                
    request.ContentType = "multipart/form-data;boundary="+boundary;


    using (var requestStream = request.GetRequestStream())
    using (var writer = new StreamWriter(requestStream))
    {
        writer.WriteLine(boundary);
        writer.WriteLine("Content-Disposition: form-data; name=\"data\"");
        writer.WriteLine();
        writer.WriteLine("abcdefg");
        writer.WriteLine(boundary + "--");
        writer.Flush();
    }
    string responseData = string.Empty;
    using (var response = request.GetResponse())
    using (var responseStream = response.GetResponseStream())
    using (var reader = new StreamReader(responseStream))
    {
        responseData=reader.ReadToEnd();
    }
</code></pre>

<p>and this is the server code (php):</p>

<pre><code>print file_get_contents("php://input");
</code></pre>

<p>or:</p>

<pre><code>print $_POST["data"];
</code></pre>

<p>or:</p>

<pre><code>print $http_raw_post_data;
</code></pre>

<p>or:</p>

<pre><code>$fp=fopen("php://output","rb");
$contents=fread($fp,5);
fclose($fp);
print $contents;
</code></pre>

<p>Non of these code working, all print empty.<br>
Could any one help please?</p>
