open encrypted file with php
Posted
by stormdrain
on Stack Overflow
See other posts from Stack Overflow
or by stormdrain
Published on 2010-06-03T18:51:24Z
Indexed on
2010/06/03
18:54 UTC
Read the original article
Hit count: 289
Hi,
I'm looking for a way to open encrypted files that are stored on a server. I'm using mcrypt to encrypt the files.
I was initially going to create a class that would open the file, decrypt it, write it to a new location, then open that. But I have convinced myself there is a better way (I just don't know what it is). It seems like there should be a way to stream it (?) to the browser once it's decrypted.
The initial setup would just link to the file location and the browser would take over (e.g. .pdf files would bring up a dialogue offering to open or save the file). If possible, I'd like it to do the same after decoding.
Pointers? Advice? Bueller?
Thanks!
© Stack Overflow or respective owner