- file_get_contents: documentation ( source)
- parse_str: documentation ( source)
- fclose: documentation ( source)
- fwrite: documentation ( source)
- md5: documentation ( source)
- fopen: documentation ( source)
<?php
# Save the audio to a URL-accessible directory for playback.
parse_str($_SERVER['QUERY_STRING'], $params);
$str = 'randomtype';
$file_name = md5($str);
$name = isset($params['fileName']) ? $params['fileName'] : $file_name + 'randomtype.mp3';
$content = file_get_contents('php://input');
$fh = fopen($name, 'w') or die("can't open file");
fwrite($fh, $content);
fclose($fh);
?>