Welcome to WebmasterWorld Guest from 54.158.36.59

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)

10+ Year Member



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)

10+ Year Member



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)

WebmasterWorld Senior Member 5+ Year Member



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)

WebmasterWorld Senior Member 10+ Year Member



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)

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



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)

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



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.
 

Featured Threads

Hot Threads This Week

Hot Threads This Month