Hi there,
I've got some code that acts as a download interface by sending the relevant headers for the file before sending the file data itself, the code is found all over the place and is nothing special.
I've got a question though regarding the [php_man]header[/php_man] function, how does it work? For example, I can't just simulate the change of header by using [php_man]echo[/php_man] and sending each header part, presumably I am missing a few bytes here and there that are essential.
Does anyone know how to do this manually? If at all possible, so that I could then have a CGI binary initiate the download.
Also, the last line of the download interface is to use [php_man]readfile[/php_man], does this simply read the file into a byte array and [mysql_man]echo[/mysql_man] it to the client all at once? Or is [php_man]readfile[/php_man] a little more intelligent than this?
Thanks LOADS in advance, much appreciation.
Nick.
Manual download interface
Moderator: General Moderators