Google analytics code

Wednesday, February 13, 2008

PHP: Code snippet

I found this on a page written in japanese. Great for streaming files through php and not reveling their source.

header('Content-Type: application/octet-stream');
header('Content-Length: '.filesize(''));
echo file_get_contents("");

This will also post the size of the file so you know how long it will take for it to download.

No comments:

Post a Comment

If you found this page useful, or you have any feedback, please leave a comment.