Re: munge / obfuscate ?
| From: | Bastien Koert | Date: | Fri, 28 Mar 2008 02:36:50 +0000 |
| Subject: | Re: munge / obfuscate ? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-272197@lists.php.net to get a copy of this message | ||
On Thu, Mar 27, 2008 at 9:10 PM, Joey <Joey@web56.net> wrote:
> Hi All,
>
>
>
> I have written an app to allow a person to go online and see a picture we
> take of them. When we link to the picture I don't want it to be obvious
> that the URL is
>
> Domain.Com/Pix/123.jpg because the next person we take a picture of may be
> 123.jpg, so I am trying to munge/obfuscate the URL to make it less
> obvious.
>
>
>
> Of course coders can figure it out, but we just want to keep out the
> normal
> people.
>
>
>
> Does someone have an obfuscate function which still allows the URL to
> work,
> but doesn't allow the person to figure it out?
>
>
>
> Thanks!
>
>
>
>
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
The solution here is to store the images in a folder above the web root and
then use a php page to read in the requested image ( a hash value should be
sufficient (eg <img
src='show_image.php?i=a1d3200086d3ec14dae1e40c50f6374f'>Click for image</a>
The show_image page can query the database for the true image name, read it
in from the folder and pass it to the page
hth
--
Bastien
Cat, the other other white meat