"Koutsogiannopoulos Karolos" <[EMAIL PROTECTED]> wrote in
message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> I wan't your opinion regarding a program i am constructing. It is about an
> image bank for graphic studios or anyone else who needs a program that can
> insert his pictures or descriptions of it and be able to make a fast and
> reliable search.
> What would be best.? Inserting the pictures in the DB or in the file
I would keep the image name in the database; save the original image
in a dedicated directory with a numeric name like 4920185.jpg and
then the thumbnail either with a suffix (like 4920185b.jpg) or with the
same name in a thumbnails directory; store the number as the picture ID.
The numbers should be large and pseudorandom, ie you don't want
to make it easy for someone to write a script to leech all your
pictures (it'll still be possible, but harder). Maybe use the database
ID to seed a random number generator, and use the Nth generated
Have a text field for keywords, a text field for description,
a price field?, the author's name, email, and homepage. If you put
the image directory below the web root directory, then the images
can only be accessed via a script, and you can restore the original
name at download (this solves the problem of name collisions).
If you're going to sell the pictures, you should allow a buyer more
than one download, in case they screw up or accidentally delete
it on their system; I would have a table for 'current purchases' with
a buyer ID and picture ID, and allow them something like access
for a week, up to 20 downloads of that image.
> ? Also notice that it is a reference db and not an actual bank. I mean
> there will be only photos of low quality and not the full picture which
> could be very large.
(shrug) as above, keep the images in the filesystem; then it
doesn't matter how large it is.
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]