I used in my code a modified version of Admob code that you can find the original on admob website. The idea that I never use print inside my applications, so i wrote it as a PHP class, the original code is a little bit modified. To use it simply replace $admobs variable with your own and enjoy!