Skip to content

Instantly share code, notes, and snippets.

@felipezarco
Created May 24, 2019 14:49
Show Gist options
  • Select an option

  • Save felipezarco/b2d5b8ab62cbfecd92a5f190d221c29d to your computer and use it in GitHub Desktop.

Select an option

Save felipezarco/b2d5b8ab62cbfecd92a5f190d221c29d to your computer and use it in GitHub Desktop.
Force Download Header WAV
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