homepage Welcome to WebmasterWorld Guest from
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member
Home / Forums Index / Google / Google AdSense
Forum Library, Charter, Moderators: incrediBILL & jatar k & martinibuster

Google AdSense Forum

TXT Include Files
Can these be used to house the adsense html?

 8:21 pm on Sep 12, 2006 (gmt 0)

is it possible to put adsense html on a page using include files that referrence an adsense txt file that holds the code?

I tried doing this with no luck....google wasn't showing any ads...so I wasn't sure if I was doing it wrong or if perhaps google couldn't determine the content of the page the adsense was being included on.



 8:48 pm on Sep 12, 2006 (gmt 0)

I believe you should be able to use any server-side or javascript include. I use php includes and that works.

Maybe you are missing a piece of the adsense code. Do you have the full code in the include? Do you get any kind of error? Does your html validate? Do you have enough content on the page?


 8:50 pm on Sep 12, 2006 (gmt 0)

Yes, you can place Adsense code in include files. Whether those files are .TXT, .ASP, .PHP, etc.

If your ads are not showing with the include file, there is something out of sync with your HTML.

If you copy/paste the Adsense code directly from the Adsense site, it should work fine.


 8:52 pm on Sep 12, 2006 (gmt 0)

what you are wanting to do is absolutely possible.

If no ads were showing, did you check to make sure the include had actually worked? In other words, did you view the source code of the page to make sure the adsense code was actually there?

If the adsense code is there, then it worked, if the adsense code isn't there, but the actual include statement is still there, it just means the server didn't parse the page (possibly trying to call an include from a static html page without telling the server to parse it?).


 11:23 pm on Sep 12, 2006 (gmt 0)

to test to see if the include is working put something in the included file and then see if it shows up in the source code for the page

if it does, then it isn't the include that isn't working


 12:05 am on Sep 13, 2006 (gmt 0)

we need to know what server side you are using. Is it asp, php, shtml. I prefer php myself. Also you can use any of these server sides with any extension. Like you can have page.html page.php page.asp page.shtml and use any server side you want in each one. You just have to set up your .htaccess right.

Global Options:
 top home search open messages active posts  

Home / Forums Index / Google / Google AdSense
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved