Andy wrote: > ... > I want to know... is this a big performance issue or not(the image is handled by php and not by apache directly) > > OR... > > Is there any other way to handle this situation??? > > Thanx, > Andy. I'd recomend doing a bit of benchmarking to figure out if the performance hit is acceptable. Using php is the easiest solution. Assuming that PHP is too slow for you, you can actually solve this issue with some abuse of mod_rewrite. You can use cookies to control the access by using the cookie variable with mod_rewrite, it's accessible as HTTP_COOKIE. You will need to parse the cookie string yourself. This allows you to do something like link to user.png and set a cookie user=35 and have mod_rewrite change it to access the 35.png file. You can also do things like block anything that doesn't match 35.....png. You can't do anything fancy like DB based permissions though. Using cookies is still not secure however. You can obstuficate it fairly well but a determined user can still get around any cookie protections. You can beef up the mod_rewrite to handle this by using an external program via RewriteMap and php session files, even database access is possible. However 99% of the time I don't think that it would be worth it. David -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php