The main idea is this:
I’ll store some images on the server and have a list of them. Then when an user requests a particular image, let’s say “lakes.png”, I want to be able to return a random image from the lakes list/array, but I’m totally clueless about how to detect a request to that particular file and call the function that selects a random file before displaying it to the user.
Thanks in advance.
rewrite the request using .htaccess, e.g.
So requesting lakes.png would be redirected to image.php?name=lakes