Suppose user A has some images in his/her account in Facebook which s/he can view after log-in.
If user A logs out and the url of one of those images is tried, 'access restriction '-type message appears.
Think of a social networking site built in PHP.
How to achieve that kind of control so that NO images can be viewed without logging in to the site JUST as Facebook does?