Technically you can do it. The main problem is re-writing the image filename every time.
This means you need to copy the placeholder.jpg to a new file, rename it, then display it.
And then you need to have a clean-up script that deletes the new .jpg after the session is finished (or have it clean up your images directory every X hours or so).
HOWEVER, is it worth doing? Probably not.
The images won't be indexed by google images because they will only exist for a finite amount of time (unless you want to keep all of the clones in a directory which could result in tens of thousands of images AND this also opens up your site to spam attacks that would overload your server storage).
As for SEO benefits, the return on investment is negligible to none.
So if you would actually want to do it the process would roughly look like this:
1 - Get the URL slug (mydomain.com/this-is-the-slug) : How you do this varies on your setup. In Wordpress $post->slug, in pure PHP you'd need to use some REGEX
2 - Find the placeholder.jpg image: $imagePath = /home/domain/public_html/images/your-image.jpg
3 - Copy the file with its new name : $copied = copy($imagePath , $newName);
4 - Serve the image to the user: $image = $copied ? $copied : $default_placeholder;
__________________
skype: lordofthecameltoe
|