I find it easier to just install a copy of OpenX Ad Server (formerly OpenAds, formerly PHPAds) to manage my ads. You can copy and paste the ad code into the tpl file (templates folder) to put it wherever you want. You can get a copy at openx.org