<?php
header( 'Cache-Control: no-cache' );
header( 'Pragma: no-cache' );
header( 'Content-Type: application/octet-stream' );
header( 'Content-Disposition: attachment; filename = "foobar.txt"' );
readfile( 'foobar.txt' );