Does anyone know where I can find a random image generator?

I've searched google and haven't found what I'm looking for.

It dosn't sound too complicated, but I'm not good with php coding.

I just need a script that will randomly choose an image from a directory and display it where I put the script on my site. I've found a script that does that function, but it's the next function that I'm having trouble finding:

I also need the images to have their own links, and I can't figure out how to do this.

So, just to sum it up, I'm looking for a random image generating script that will also link to other pages of my site. (Each image needs a different link)

Thanks in advance for the help.

    Basically there are two ways to do this:

    1. If you want to have the picture name in the link you can just get it and use it.

    2. If you want a link that have no relationship to the picture name you should use a database. One column for the path to the picture, another containing the path to the link.

      The link will have nothing to do with the location of the picture. And is a MySql database a good way to go about doing this?

      And how would I go about this? I've never actually used databases before.

        You could put the path and image names into a text file instead of getting into databases if you want to?

          6 days later
          lakeccrunner wrote:

          The link will have nothing to do with the location of the picture. And is a MySql database a good way to go about doing this?

          Yes. The advantages a database have over files is that it only reads what is neededs and not the whole file, it may easily be a performance issue with files. Also it is easy to add more addresses, change existing ones or remove completely.

          lakeccrunner wrote:

          And how would I go about this? I've never actually used databases before.

          Google is your friend

          lakeccrunner wrote:

          ^ How would I go about doing that?

          Google is still your friend

            Write a Reply...