Welcome Guest, Not a member yet? Register   Sign In
Preventing direct access to images... or something...?
#4

[eluser]coolfactor[/eluser]
I subclassed the Router library and added a special "img" shortcut. Whenever a route beginning with /img/ was encounted, the Router would search for a corresponding image in a designated location, and then pass that back to the browser. It's slightly slower, but offers protection.

Code:
/img/some_image.jpg

The Router determines the file is a JPEG image, sends the appropriate headers, and then fpassthru's the file.


Messages In This Thread
Preventing direct access to images... or something...? - by El Forum - 09-04-2007, 09:05 PM
Preventing direct access to images... or something...? - by El Forum - 09-04-2007, 10:31 PM
Preventing direct access to images... or something...? - by El Forum - 09-04-2007, 10:47 PM
Preventing direct access to images... or something...? - by El Forum - 09-04-2007, 10:52 PM
Preventing direct access to images... or something...? - by El Forum - 09-04-2007, 11:38 PM
Preventing direct access to images... or something...? - by El Forum - 09-05-2007, 01:20 AM
Preventing direct access to images... or something...? - by El Forum - 09-05-2007, 01:48 AM
Preventing direct access to images... or something...? - by El Forum - 09-05-2007, 02:02 AM
Preventing direct access to images... or something...? - by El Forum - 09-05-2007, 04:53 AM
Preventing direct access to images... or something...? - by El Forum - 09-05-2007, 05:52 AM
Preventing direct access to images... or something...? - by El Forum - 09-05-2007, 06:11 PM
Preventing direct access to images... or something...? - by El Forum - 09-05-2007, 07:35 PM
Preventing direct access to images... or something...? - by El Forum - 09-05-2007, 08:08 PM
Preventing direct access to images... or something...? - by El Forum - 10-16-2007, 01:45 PM



Theme © iAndrew 2016 - Forum software by © MyBB