How do these PHP download pages (e.g. somesite.com/download.php?id=somefile) often found work?
I originally thought of a page that does the counter stuff, and then simpl
This isn't really a PHP-specific issue. In order to make the web browser "download" (whether it be the contents of a static file or the body of a dynamically generated report), set the Content-Disposition header in the HTTP response. PHP allows you to set the HTTP headers using the header function, so your PHP script should do this before streaming the file contents back to the HTTP client.