PDA

View Full Version : could I put this in my header template to randomize adsense+my own banner .gif?


SeanThomps
09-19-2005, 10:40 PM
I want to randomly display my adsense script and a banner or two. Could I insert something like this into my header template:

<?php
$number=mt_rand(1, 2);
if ($number==1)
{
include "http://www.volconvo.com/adsense.txt";
}
else
{
include "http://www.volconvo.com/banners.txt";
}
?>

With those .txt files full of their respective codes...

Or would you do something else?

Rick
09-19-2005, 10:59 PM
Placing Google ads in your header will cause them to appear on every page of your site including the registration and control panel pages. Google frowns on that. They emailed me and told me to remove the code from those pages. The reason they found out about it is that I sent out a mass mailing from Vb to all registered users with at least 1 post. Someone couldn't remember their password to unsubscribe themselves from my email list so they became irate and emailed Google saying I was sending unsolicited email.

I wish I could tell you how we coded the ads in without displaying them on those pages, but my server admin took care of that for me. I just noticed your thread and thought I would chime in with the news I had recieved from Google. Good luck.

SeanThomps
09-21-2005, 03:34 AM
anyone?