[pmwiki-users] Please challenge me: Script idea
jo at durchholz.org
Thu Oct 5 09:02:00 CDT 2006
I've got a fourth option:
Add a PmWiki action that will directly serve the image, as binary data.
All you need to do is to set the right http headers, open the image file
in binary, and print it. That way, you can place the image files in a
URL-inaccessible directory and let PmWiki do the auth checking.
A *very* rough sketch:
getimagesize (image file name)
returns an array which, among other things, tells the file type
header (header string that says 'image/jpg' or whatever if right);
print file_get_contents (image file name);
Hope this gets you started.
More information about the pmwiki-users