I have a blog website. We provide some HTML that the user can embed on his page, and he has something like this:
<img src = "http://example.com/img.jpg" />
Unfortunately, I had to move images from time to time. Every time I have to move an image, the image no longer works for people who put the code on their site.
I am wondering if there is a way in PHP so that I can do something like this:
<img src = "http://example.com/getImage.php?id=523" />
And let getImage.php really redirect to the actual URL of the image (viewed from my database with this ID). That way, I can have one URL for the user, and if I ever need to move the image, I just do it in my database and the user background is still working.
Any suggestions?
Lukas source
share