Forum Moderators: coopster
Context
I’m forcing downloads by printing out strings, and would like a proper Content-Length header. If I wanted to get hackish, I know I could output the string to a temporary file and then use filesize() and readfile(), but I’d rather not go that route.
I am/was hoping there's a built-in function I've overlooked that automatically takes all that into account and magically spits out a number.
Thanks for the help though!
This function might be helpful. Make sure to read the comment left on that page, it might help also.