<?php $langfile = "test.txt"; header("Content-Type: octet-stream"); header("Content-Length: ".filesize ($langfile) ); header("Content-Disposition: attachment; filename=$langfile"); include($langfile); ?>