Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> Blocks
Author Message
oyjord
Hangin' Around


Joined: Aug 25, 2006
Posts: 44

PostPosted: Sat Jan 19, 2008 3:10 am Reply with quote

Hi all,

I've been wracking my brain, scouring the net for tips on how to get an Adsense block off the ground. Here's the code I'm using now:

Code:


<?php
if (eregi("block-AdSense.php",$PHP_SELF)) {
  Header("Location: index.php");
  die();
}
?>
<script language="JavaScript">
<!--
google_ad_client = 'mynumber';
google_ad_slot = "mynumber";
google_ad_width = 125;
google_ad_height = 125;
// -->
</script>
<?php
$content .= "<center><script language=\"JavaScript\"
src=\"http://pagead2.googlesyndication.com/pagead/show_ads.js\">";
$content .= "</script></center>";
?>


All this does is show an empty box in right hand block column.

Thanks for any help,
Oy.
 
View user's profile Send private message
Raven
Site Admin/Owner


Joined: Aug 27, 2002
Posts: 17086

PostPosted: Sat Jan 19, 2008 9:47 am Reply with quote

That's because you haven't added the google code to the $content variable. Try this.

Code:
<?php

if (eregi("block-AdSense.php",$PHP_SELF)) {
  Header("Location: index.php");
  die();
}
$content = <<<_GOOGLE_
<center><script type="text/javascript"><!--
google_ad_client = 'mynumber';
google_ad_slot = "mynumber";
google_ad_width = 125;
google_ad_height = 125;
//--></script>
<script type="text/javascript"
  src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></center>
_GOOGLE_;
?>
 
View user's profile Send private message
Display posts from previous:       
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> Blocks

View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 6 Hours
 
Forums ©