file_get_contents('http://url/to/upload/handler', false, $context);
$filename = "/path/to/uploaded/file.zip";
$file_contents = file_get_contents($filename);
$content = "--".MULTIPART_BOUNDARY."
".
"Content-Disposition: form-data; name="".FORM_FIELD.""; filename="".basename($filename).""
".
"Content-Type: application/zip
".
$file_contents."
";
// add some POST fields to the request too: $_POST['foo'] = 'bar'
$content .= "--".MULTIPART_BOUNDARY."
".
"Content-Disposition: form-data; name="foo"
".
"bar
";
// signal end of request (note the trailing "--")
$content .= "--".MULTIPART_BOUNDARY."--
";
$header = 'Content-Type: multipart/form-data; boundary='.MULTIPART_BOUNDARY;