Re: [PHP] Strategy to protect images
- Date: Sun, 15 Jun 2008 08:51:57 -0400
- From: Stephen <stephen-d@xxxxxxxxxx>
- Subject: Re: [PHP] Strategy to protect images
I am not familiar with this bit of http. It looks like something I want to explore.
Can you send html as well as just the image? Thanks Stephen Nirmalya Lahiri wrote:
Yes... you can do it. Instade of direct url image, use the url of a php script written(algorithm) below.. <?php /* Write down the code to check authentication of users if( unauthorise user ) then exit from code */ /* Read the image data from file */ header('Content-type: image/jpeg'); /* echo the raw image data */ ?> --- Nirmalya Lahiri [+91-9433113536] --- On Sun, 6/15/08, Stefano Esposito <ragnarok@xxxxxxxx> wrote:From: Stefano Esposito <ragnarok@xxxxxxxx> i have to forbid users of my site to view images directly (i.e. writing the image URL in the address bar) but they'd be able viewing them from the pages of the site. What's the best way of doing it, or something similar? Is there a common strategy using PHP? Thank you for any hint :-)
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
- Follow-Ups:
- Re: [PHP] Strategy to protect images
- From: Bastien Koert
- Re: [PHP] Strategy to protect images
- References:
- Re: [PHP] Strategy to protect images
- From: Nirmalya Lahiri
- Re: [PHP] Strategy to protect images
- Prev by Date: Re: [PHP] Strategy to protect images
- Next by Date: Re: [PHP] Strategy to protect images
- Previous by thread: Re: [PHP] Strategy to protect images
- Next by thread: Re: [PHP] Strategy to protect images
- Index(es):