Welcome Guest, Not a member yet? Register   Sign In
Restrict direct image viewing
#10

[eluser]Daniel Eriksson[/eluser]
If you want to access-control your images I suggest:

* Store the images in a protected directory (outside webroot for example).
* Store information about each image in a database (original file name, MIME-type, size, access restrictions, ...).
* In your image controller, check if the current user is allowed to view the image.
* Use header() and readfile() to send the image to the user.

Take a look at my reply in another thread: http://ellislab.com/forums/viewthread/75997/#380686


Messages In This Thread
Restrict direct image viewing - by El Forum - 06-05-2008, 06:11 PM
Restrict direct image viewing - by El Forum - 06-06-2008, 12:28 AM
Restrict direct image viewing - by El Forum - 06-06-2008, 12:40 AM
Restrict direct image viewing - by El Forum - 06-06-2008, 01:05 AM
Restrict direct image viewing - by El Forum - 06-06-2008, 01:50 AM
Restrict direct image viewing - by El Forum - 06-06-2008, 01:14 PM
Restrict direct image viewing - by El Forum - 06-07-2008, 12:41 PM
Restrict direct image viewing - by El Forum - 06-07-2008, 06:18 PM
Restrict direct image viewing - by El Forum - 06-08-2008, 02:06 AM
Restrict direct image viewing - by El Forum - 06-09-2008, 02:17 AM
Restrict direct image viewing - by El Forum - 06-09-2008, 06:52 PM
Restrict direct image viewing - by El Forum - 06-09-2008, 08:09 PM
Restrict direct image viewing - by El Forum - 06-10-2008, 09:03 AM
Restrict direct image viewing - by El Forum - 06-10-2008, 10:58 AM



Theme © iAndrew 2016 - Forum software by © MyBB