How to protect against direct access to images? [closed]

http://us3.php.net/image You link the img element to a php file. This file checks if the user has the right permission, if so it can send an img response back. <img src=”https://stackoverflow.com/questions/3990337/url/LoadImg.php?id=1337″ alt=”” /> Still someone with the permission can download the image and provide it to other people somewhere else (webspace/mail/whatever). To make it a … Read more

Can we increase the re-usability of this key-oriented access-protection pattern?

I like this idiom, and it has the potential to become much cleaner and more expressive. In standard C++03, I think the following way is the easiest to use and most generic. (Not too much of an improvement, though. Mostly saves on repeating yourself.) Because template parameters cannot be friends, we have to use a … Read more