You are not sending the filename to the client, so how should it know which filename to use?
There is a drawback, you can provide the desired filename in the http header, but some browsers ignore that and always suggest the filename based on the last element in URL. For example http://localhost/download.php?help.me would result in the sugested filename help.me in the file download dialogue.
Patrick Cornelissen
2010-05-31 09:13:25