I would HIGHLY recommend that you get a VPS/Ded for this task, and install Apache and mod_layout.
However, that said you can include ads using the following solution, although this may use quite a lot of resources, and is quite a complex method:
Use mod_rewrite rules (in a .htaccess file - obviously needs to be protected from user manipulation) to redirect ALL hits to files to a PHP script, and send the REQUEST_FILENAME variable to the PHP script using the GET method.
PHP script then parses incoming variable and looks at extension (then decides whether or not to include advert.html) - e.g. files with extension .html/.htm/.txt will automatically have advert.html included, files .gif/.jpg/.swf will NOT have advert.html included.
PHP script can now include original file.
Result is that HTML files will have an advert stuck on, and then are sent to the browser, while other files such as images will not have the advert file included.