Re: Strategy to protect images
| From: | Nirmalya Lahiri | Date: | Sun, 15 Jun 2008 12:25:36 +0000 |
| Subject: | Re: Strategy to protect images | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-275403@lists.php.net to get a copy of this message | ||
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@email.it> wrote:
> From: Stefano Esposito <ragnarok@email.it>
> Subject: [PHP] Strategy to protect images
> To: php-general@lists.php.net
> Date: Sunday, June 15, 2008, 5:18 PM
> Hi all,
>
> 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 :-)
>
> Ciao,
> Stefano
>
>
> --
> Email.it, the professional e-mail, gratis per te:
> http://www.email.it/f
>
> Sponsor:
> VOGLIA DI VACANZE ?
> * A Riccione i Family Hotels sono gli alberghi
> specializzati per le vacanze dei bambini
> Clicca qui:
> http://adv.email.it/cgi-bin/foclick.cgi?mid=7984&d=15-6
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php