Redirect PHP page to IMG
I have a blog background website.  We provide some HTML code that the user can insert into his page, and it has something like this:

&lt;img src="http://site.com/img.jpg" /&gt;

Unfortunately, I have had to relocate the images from time to time.  Each time I have to relocate the image, the image no longer works for the people who have put the code into their site.

I am wondering if there is a way in PHP so that I can do something like this:

&lt;img src="http://mysite.com/getImage.php?id=523" /&gt;

And have the getImage.php actually redirect to the actual image URL (looked up from my database with the given ID).  In this way, I can have one URL to give to the user, and if I ever need to relocate the image, I just do it in my database, and the user's background still works.

Any suggestions?
Redirect PHP page to IMG
===

I have a blog background website.  We provide some HTML code that the user can insert into his page, and it has something like this:

&lt;img src="http://site.com/img.jpg" /&gt;

Unfortunately, I have had to relocate the images from time to time.  Each time I have to relocate the image, the image no longer works for the people who have put the code into their site.

I am wondering if there is a way in PHP so that I can do something like this:

&lt;img src="http://mysite.com/getImage.php?id=523" /&gt;

And have the getImage.php actually redirect to the actual image URL (looked up from my database with the given ID).  In this way, I can have one URL to give to the user, and if I ever need to relocate the image, I just do it in my database, and the user's background still works.

Any suggestions?