Skip to content

Instantly share code, notes, and snippets.

@debojitkakoti
Last active August 29, 2015 13:56
Show Gist options
  • Save debojitkakoti/9183653 to your computer and use it in GitHub Desktop.
Save debojitkakoti/9183653 to your computer and use it in GitHub Desktop.
PHP Header code to download wav files
header('Content-Description: File Transfer');
header('Content-Type: application/octet-stream');
header('Content-Disposition: attachment; filename='.basename($destination_name_ulaw));
header('Content-Transfer-Encoding: binary');
header('Expires: 0');
header('Cache-Control: must-revalidate');
header('Pragma: public');
header('Content-Length: ' . filesize($destination_name_ulaw));
ob_clean();
flush();
readfile($destination_name_ulaw);
exit();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment