#Script by bloghash.com
function disp_google_ads() {
$url_cur = $_SERVER['REQUEST_URI'];
$url_cur_len = strlen($url_cur);
#
# You will have to put a \ (backslash) in front of every quote (") like I
# have done (excluding the first and last quote), so that
# PHP can process the text
#
# AdSense Code for the main page!
//Replace with your code (and put \ in front of every quote (excluding the first and last quote))
$ad = "
";
# AdSense Code for a single page!
//Replace with your code (and put \ in front of every quote (excluding the first and last quote))
$ad_1 = "
";
if ($url_cur_len < 2) {
# Remove or add more lines as per your requirement
# Three lines do display three ads. Add or remove, as you like to.
# Remove all the three lines to display nothing!
echo "$ad\n";
echo "$ad\n";
echo "$ad\n";
} else {
#Displaying just one ad. Add more lines, or remove to display nothing!
echo $ad_1;
}
}