Welcome Guest, Not a member yet? Register   Sign In
Good solution for protecting image files in folder
#21

[eluser]slowgary[/eluser]
Sorry, I missed the referrer check in your htaccess above. That method would also protect your files from hotlinking if you can get it to work right.

As far as performance goes... yes, using a controller will add overhead. It shouldn't be a whole lot, but if you're autoloading a ton of CI libraries then it could be. The benefit to using a controller is that it's not just limited to protecting images from hotlinking. It really depends on your application, but you could protect images that belong to one user from being seen by another user, or you could allow users to see images for only a certain period of time, or you could limit the number of images a user views within a given time, or if you wanted to be able to retrieve different sizes of an image such as thumbnails, or screen size, or maybe add a watermark.

If all you want to do is protect from hotlinking, the htaccess will probably be the best performer. I'm more of an htaccess "copy and paster", so I can't really help in that department. Good luck, I hope this helps.


Messages In This Thread
Good solution for protecting image files in folder - by El Forum - 02-15-2010, 01:40 PM
Good solution for protecting image files in folder - by El Forum - 02-15-2010, 01:51 PM
Good solution for protecting image files in folder - by El Forum - 02-15-2010, 01:53 PM
Good solution for protecting image files in folder - by El Forum - 02-15-2010, 01:56 PM
Good solution for protecting image files in folder - by El Forum - 02-15-2010, 02:00 PM
Good solution for protecting image files in folder - by El Forum - 02-15-2010, 02:15 PM
Good solution for protecting image files in folder - by El Forum - 02-15-2010, 02:29 PM
Good solution for protecting image files in folder - by El Forum - 02-15-2010, 02:32 PM
Good solution for protecting image files in folder - by El Forum - 02-15-2010, 02:40 PM
Good solution for protecting image files in folder - by El Forum - 02-15-2010, 02:47 PM
Good solution for protecting image files in folder - by El Forum - 02-15-2010, 02:59 PM
Good solution for protecting image files in folder - by El Forum - 02-15-2010, 03:05 PM
Good solution for protecting image files in folder - by El Forum - 02-15-2010, 03:09 PM
Good solution for protecting image files in folder - by El Forum - 02-15-2010, 03:11 PM
Good solution for protecting image files in folder - by El Forum - 02-15-2010, 04:16 PM
Good solution for protecting image files in folder - by El Forum - 02-15-2010, 04:51 PM
Good solution for protecting image files in folder - by El Forum - 02-15-2010, 05:02 PM
Good solution for protecting image files in folder - by El Forum - 02-21-2010, 08:15 AM
Good solution for protecting image files in folder - by El Forum - 02-21-2010, 08:42 AM
Good solution for protecting image files in folder - by El Forum - 02-21-2010, 09:37 AM
Good solution for protecting image files in folder - by El Forum - 02-21-2010, 09:51 AM
Good solution for protecting image files in folder - by El Forum - 02-21-2010, 10:36 AM
Good solution for protecting image files in folder - by El Forum - 02-21-2010, 02:31 PM
Good solution for protecting image files in folder - by El Forum - 02-21-2010, 04:52 PM



Theme © iAndrew 2016 - Forum software by © MyBB