Here's what I want to do:
Let's say I have an image located at [noparse]http://www.example.com/image.png[/noparse]. I want it to be so that when that image is viewed, it accesses a PHP script that pulls a random image from my files and displays that.
So I have a directory called /images/ with three files in it:[INDENT][noparse]http://www.example.com/images/1.png[/noparse]
[noparse]http://www.example.com/images/2.png[/noparse]
[noparse]http://www.example.com/images/3.png[/noparse][/INDENT]
So if on a web page the image is called, I.E. <img src="[noparse]http://www.example.com/image.png[/noparse]" />, it actually runs a script. This script would be simple, just something like:
$file_choice = mt_rand(1,3);
$new_image = "http://www.example.com/images/" . $file_coice . ".png";
$new_destination = "http://www.example.com/image.png";
copy ($new_image, $new_destination);
I'm just not certain how to access it when the image is called.
By the way, if it matters, this image will be used with BBCode. I'm a member on an art site's forum and want the image in the [img] tags to dynamically change and cycle through some things I have on my site's gallery.