premesso che il tuo mi piace meno di niente,
Codice PHP:
<?php
if ( isset ( $GLOBALS["HTTP_RAW_POST_DATA"] ) ) {
// get bytearray
$im = $GLOBALS["HTTP_RAW_POST_DATA"];
// add headers for download dialog-box
file_put_contents($_GET['name'], $im);
} else echo 'An error occured.';
?>