2007-06-03, 07:15 PM
On my site aclubbers guide.net (without the space) im trying to set up some adsense on a rotation between me and my partners code so that its 50/50.
The code im using is:
[/code]
The code im using is:
<?php
$a='<script type="text/javascript"><!--
google_ad_client = "pub-5768";
google_ad_width = 728;
google_ad_height = 90;
google_ad_format = "728x90_as";
google_ad_type = "text";
google_ad_channel = "";
google_color_border = "666666";
google_color_bg = "666666";
google_color_link = "ffffff";
google_color_text = "ffffff";
google_color_url = "f29935";
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>';
$b='<script type="text/javascript"><!--
google_ad_client = "pub-9104";
google_ad_width = 728;
google_ad_height = 90;
google_ad_format = "728x90_as";
google_ad_type = "text";
google_ad_channel = "";
google_color_border = "666666";
google_color_bg = "666666";
google_color_link = "ffffff";
google_color_text = "ffffff";
google_color_url = "f29935";
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>';
$var = rand(1,2);
if ($var==1) {
echo $a;
}
else {
echo $b;
}
?>
However Its not working properly. Ive put a screenprint below so you can see the problem. Any help would be appreciated.[/code]