This may be a stupid question, but I need the answer. Can you use include files for adsense? I checked their TOS but could not find anything on it. Does using an include have any effect on the contextual matching of the page? Thanks for the help.
You can use includes for adsense ads. What google does not like are iframes. When you "view source" of a page using includes, you do not see the include itself, but just the info that is in the include (it's invisible basically) It's a great way to save yourself time when changing ad formats or colors, etc.
My content is pulled from a SQL database and based on the length of the content my php includes of my adsense ads determines which ads to show. If its only a few paragraphs I'll use big blocks, otherwise if its a full page or longer it knows to use skyscrapers. I've found it makes pages look less tacky and there is a definate correlation between the length of the content and the length of the ads I use. Its also very easy to test different ads this way.
There is nothing against TOS using include php command. Every 2nd blog using Wordpress, put Google Ads same way. Infact after inclusion of several php files only single file results in a browser.
include is fine but make sure you didnt change anything with the adsense code. ^^ (i still do add each page manual with my php though )
as an example , like my work in "http://partybacolod.com" i created a file -------- just 1 file ex. adsense.example.php ------------- <? $bg_example = "#FAFAFA"; $font = "#0000005"; ... and so on... ?> <script> //the adsense script here //changing the color adsense_bg = "<?=$bg_example;?>"; adsense_font = "<?=$bg_font ;?>"; and so on..... </script> --------- END---------------- if i want to include this in my another php file, <? include("adsense.example.php");?> //make sure that the file is in the same directory
if your ad code is not in a function then when some idiot find out your include file path (not likely anyway) can they say u have that page for just showing ads? oh i am just silly.