If you are trying to dynamically create an image with php and have that be in the <img src... tag, simply replace your ddd.gif with a php script which returns an image. You'll probably need to make sure the correct MIME type, e.g. PNG, JPG, is included in the header of the php script generating the image as well.