Re: Block direct image loads but allow them in PHP

From: Date: Sat, 15 Feb 2003 16:13:40 +0000
Subject: Re: Block direct image loads but allow them in PHP
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-135675@lists.php.net to get a copy of this message
If the user knew the actual URL of the image though, wouldn't they be able to get around a script like this by simply typing it into their web browser? Thanks! :-) > On 02/15/03 10:55 AM, "Marco Tabini" <marcot@tabini.ca> wrote: > I guess the easiest would be to filter those images through a php > script. Your PHP script would perform whatever checks are needed (for > example, you could check ther HTTP_REFERER variable, or a shared token > with the originating PHP script) and then output the image only if it's > appropriate to do so. This way, your images would not be accessible to > your users at all--unless you wanted them to be. -m^2 __________ Hi! I'm a .signature virus! Copy me into your ~/.signature to help me spread! __________

« previous php.general (#135675) next »