Txt

Byte sized tech know-how.

  • Home
  • About

Tag Archives: octect

25 Apr

Force Download Dialog with PHP using octect-stream

Use this code to force a download of any type of content with PHP


header("Content-type:application/octect-stream");
header('Content-Disposition: attachment; filename=filename_' . date('Y-m-d') . '.sql');
print "Hello World";
admin Posted in Code, PHP content, download, header, octect, PHP, stream, web Leave a comment

Post navigation

Categories

  • Code
  • Command Line
  • Configuration
  • CSS
  • HTML
  • internet
  • JavaScript
  • Linux
  • Mobile
  • Perl
  • PHP
  • Python
  • Ruby
  • Uncategorized

Meta

  • Log in
  • Entries feed
  • Comments feed
  • WordPress.org
Fruitful theme by fruitfulcode Powered by: WordPress
↑