It is quite easy to store images in a database and display them on the
screen.  You can find tutorials about this online (sorry I don't have
any direct links).  There are also numerous FREE scripts pre-written
that you can integrate into your site, or use to learn how to do this
yourself.

There is a catch however... and that is you will not be able to display
anything else along with those images because special content headers
must be sent to let the browser know what kind of data it's receiving.
Is it a JPEG, GIF or PNG?  If the headers are not sent, or the wrong
headers are sent, the image will either not display or the user will see
endless rows of junk text spewed onto the screen (the binary data in
ASCII form!!).

So this method will only work if you want to display the images in a
frame, one at a time, and by them selves.  You won't be able to
intermingle HTML so forget about doing dynamic menus with this method.

The way these dynamic sites work is by storing the paths to each image
in the database rather than the images themselves... so you're back to
the file system solution.

Anyway I hope this helps answer some of the questions you were having
about this method.  :)

-Kevin

-----Original Message-----
From: Omland Christopher m [mailto:[EMAIL PROTECTED]] 
Sent: Tuesday, March 26, 2002 2:45 PM
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP] Loading Images

I wasn't so much concearned about security of users grabbin pics. I am
more trying to learn how these people load there menus dynamically and
pics dynamically. Do you have any links to pages or code that describe
how
to make a link in the db to pics on my filesystem?
Thanks.
-Chris

On Tue, 26 Mar 2002 [EMAIL PROTECTED] wrote:

> At 26.03.2002  12:47, you wrote:
> >
> >I don't have any code for this, but I'm hoping someone can point me
in the
> >right direction. I want to load images or navigation menus
dynamically. Is
> >it possible to build a database of images and then use php to display
> >them? Or something along these lines. I know this must be possible,
> >becuase I see sites that do something like this, and I cant seem to
right
> >click the image and save it. Does this make any sense?
> >Thanks.
> >-Chris
> Storing images in a db is not a good idea. instead store them
> in your filesystem an have a reference to them in your db.
> Then you can make everything ;-)
>
> Even there´s no real security for grabbing pics. If your client can
see them,
> they are on his/her machine. To prevent the right-click, you have to
use
> JavaScript, but that only works, if the user has it switched on.
> A little more secure is putting the pics in flash-movies. But I think
there are
> already programs out, which allow to extract pictures and componenets.
> HTH Oliver
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to