Welcome to WebmasterWorld Guest from 54.147.44.13

Forum Moderators: incrediBILL & martinibuster

Message Too Old, No Replies

TXT Include Files

Can these be used to house the adsense html?

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

Junior Member

10+ Year Member

joined:Dec 5, 2003
posts:137
votes: 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 Sept 12, 2006 (gmt 0)

Full Member

10+ Year Member

joined:Nov 30, 2003
posts:249
votes: 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 Sept 12, 2006 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:Jan 12, 2006
posts:1304
votes: 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 Sept 12, 2006 (gmt 0)

Senior Member from US 

WebmasterWorld Senior Member 10+ Year Member

joined:Aug 28, 2002
posts:993
votes: 2


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 Sept 12, 2006 (gmt 0)

Administrator

WebmasterWorld Administrator jatar_k is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:July 24, 2001
posts:15755
votes: 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 Sept 13, 2006 (gmt 0)

Senior Member from US 

WebmasterWorld Senior Member ogletree is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:Apr 14, 2003
posts:4249
votes: 16


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.