Less stress programming 😉
This is a simple widget to display Google adverts on your website.
Plugins—>Add New—>Upload Plugin…
Once uploaded activate the plugin and you will have a new widget in Appearance–>Widgets
Enter you Google Code client code, Ad slot and Ad Format… Save and your done.
You can get your Google Adsense code from https://www.google.com/adsense/login