PHP Include files for Adsense

Discussion in 'AdSense' started by Megadeals, May 14, 2007.

  1. #1
    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.
     
    Megadeals, May 14, 2007 IP
  2. FanAddict

    FanAddict Notable Member

    Messages:
    7,017
    Likes Received:
    376
    Best Answers:
    0
    Trophy Points:
    230
    #2
    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.
     
    FanAddict, May 14, 2007 IP
  3. seedybee68

    seedybee68 Guest

    Messages:
    70
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #3
    All my adsense stuff is in php files. It makes amends so much easier
     
    seedybee68, May 14, 2007 IP
  4. aayahoon

    aayahoon Peon

    Messages:
    63
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #4
    yes include is allowed after all in output no one knows
     
    aayahoon, May 14, 2007 IP
  5. Salzmedia

    Salzmedia Peon

    Messages:
    6
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    0
    #5
    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.
     
    Salzmedia, May 14, 2007 IP
  6. heinlein99

    heinlein99 Peon

    Messages:
    538
    Likes Received:
    11
    Best Answers:
    0
    Trophy Points:
    0
    #6
    Good idea, Salz. Definitely good for tracking.
     
    heinlein99, May 15, 2007 IP
  7. Pathan

    Pathan Well-Known Member

    Messages:
    2,196
    Likes Received:
    218
    Best Answers:
    0
    Trophy Points:
    165
    #7
    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.
     
    Pathan, May 15, 2007 IP
  8. livingearth

    livingearth Well-Known Member

    Messages:
    1,469
    Likes Received:
    83
    Best Answers:
    0
    Trophy Points:
    140
    #8
    Yes php include files are fine. Saves a lot of work and is completely invisable to the SEs
     
    livingearth, May 15, 2007 IP
  9. tradeya

    tradeya Notable Member

    Messages:
    5,729
    Likes Received:
    275
    Best Answers:
    0
    Trophy Points:
    230
    #9
    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 :p )
     
    tradeya, May 15, 2007 IP
  10. Megadeals

    Megadeals Peon

    Messages:
    561
    Likes Received:
    8
    Best Answers:
    0
    Trophy Points:
    0
    #10
    tyvm all for educating someone with much less knowledge than you.
     
    Megadeals, May 16, 2007 IP
  11. thotsa

    thotsa Well-Known Member

    Messages:
    185
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    103
    #11
    how can we include file ? someone expert pls show me sample..
     
    thotsa, May 16, 2007 IP
  12. lawrenz

    lawrenz Peon

    Messages:
    246
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #12
    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
     
    lawrenz, May 16, 2007 IP
  13. aayahoon

    aayahoon Peon

    Messages:
    63
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #13
    include file in php ?
     
    aayahoon, May 17, 2007 IP
  14. jakeldaily

    jakeldaily Peon

    Messages:
    110
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #14
    are you using a wordpress?
     
    jakeldaily, May 27, 2007 IP
  15. yyCC

    yyCC Peon

    Messages:
    222
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #15
    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.
     
    yyCC, May 27, 2007 IP