interpret .html files as php code:
depends on the webserver (e.g. apache) settings. I think you can make apache interpret .html as php by reconfiguring. however, the better way would be giving .php extensions to your php scripts.
php-generated images:
it is possible to have php deliver an image. you can do a <img src="getimage.php?some=parameters">
... as far as the php script returns an image header. see gd functions in the php.net online reference for examples.