404ing People based on Cookie
Moderator: General Moderators
-
braveryonions
- Forum Newbie
- Posts: 14
- Joined: Wed Feb 11, 2009 3:31 pm
404ing People based on Cookie
How can I 404 someone who is attempting to access an image, but does not have a necessary cookie? Is this even possible with PHP?
Re: 404ing People based on Cookie
Yes, you can set a cookie on one page, then create another page for sending images. The second page will check for the cookie, then send the image to the browser if it's set. You'll need to set the headers so the browser knows it's an image. The page will also need to know which image to send.
Code: Select all
<img src="renderImage.php?image=protected.jpg" alt="Alt Text" height="80" width="80" />