Dynamic Google Adsense Generator – PHP

By calling the PHP-function defined below, you can put Google-Adsense code as many times you want. All you need to do is simply call the function. It takes a line to call & thus doesn’t mess up your codes!

Download the code

How to Use:

After Downloading, rename it like google.php. Then, call any of the methods:

google_ad(); // Default values will be used
google_ads("1987234563", "300", "100");
// last 2 values will be used from default-values.

6 thoughts on “Dynamic Google Adsense Generator – PHP

  1. I am sorry I do not understand. What is it used for? And How to use it? And what does it mean by “you can put Google-Adsense code as many times you want” Could you please help to explain me please. Thanks,

    1. It’s a simple script to avoid typing your long adsense javascript over and over. For example, if you want to put your adsense code at 3 places of your page, just call the function 3 times. Unfortunately, google doesnot allow more than 3 adsene code blocks in a singe page 😦

Comments are closed.