Putting AdSense in php include page

Discussion in 'AdSense' started by ahelpinghand, Apr 12, 2007.

  1. #1
    is putting AdSense in php include page against tos as the content and the ads are not in the same page?
    I'm thinking of putting the AdSense code in a separate php pages and use php include to include them, I can't think of a better way for trying various AdSense formats without having to edit my whole site if I have ads on many pages. maybe one php page for every channel.

    How do you implement your AdSense code?
     
    ahelpinghand, Apr 12, 2007 IP
  2. jambo182

    jambo182 Active Member

    Messages:
    671
    Likes Received:
    8
    Best Answers:
    0
    Trophy Points:
    58
    #2
    That sounds fine to me, unless I'm missing something. I think iFrame's are against TOS, but can't see any reason why includes shall be. It's just another way of getting HTML code to display.
     
    jambo182, Apr 12, 2007 IP
  3. FanAddict

    FanAddict Notable Member

    Messages:
    7,017
    Likes Received:
    376
    Best Answers:
    0
    Trophy Points:
    230
    #3
    when you include php includes onto a page, when you go to view source, you see all the info from the include as though it was regular HTML/PHP/ETC.

    Iv been doing this for months now (makes it easier to change 4 includes then 400 ads) :)
     
    FanAddict, Apr 12, 2007 IP
  4. dualbot

    dualbot Peon

    Messages:
    20
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #4
    When google says a different page doesnt refer to php archives; A .php include page is transparent to the external browser (or bot); What google means is that need some content along with adsense code in order to select their ads, so doesnt like frames that contains only adsense.
    I think (not sure) a iframe is valid if it has sufficient content, as is a normal html page, otherwise its possible that adsense couldnt display relevant ads, or display only public service ads.
    I use currently both include pages and an ad server (phpadsnew).
     
    dualbot, Apr 12, 2007 IP
  5. kh7

    kh7 Peon

    Messages:
    2,715
    Likes Received:
    109
    Best Answers:
    0
    Trophy Points:
    0
    #5
    I concur with everybody here:
    php-include should be fine. An i-frame with only adsense in it will confuse the adsense-bot.
     
    kh7, Apr 12, 2007 IP
  6. alberti_n

    alberti_n Active Member

    Messages:
    75
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    78
    #6
    Yes, no problems, you are not modifiying the code and the end result (the output page) conforms with the Google TOS.
     
    alberti_n, Apr 12, 2007 IP
  7. matthewk

    matthewk Guest

    Messages:
    265
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #7
    If you have a large site, it is without a doubt, the best way to place your ads, and it is in no way in violation of the TOS

    Matthew
     
    matthewk, Apr 12, 2007 IP
  8. littlebobek

    littlebobek Peon

    Messages:
    763
    Likes Received:
    46
    Best Answers:
    0
    Trophy Points:
    0
    #8
    I'm doing it for years without any problems. So you will be fine.
     
    littlebobek, Apr 12, 2007 IP
  9. berners-lee

    berners-lee Peon

    Messages:
    71
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #9
    Using php include is fine. I've been doing this for several months and it will be easier to manage your adsense codes this way.
     
    berners-lee, Apr 12, 2007 IP
  10. ahelpinghand

    ahelpinghand Guest

    Best Answers:
    0
    #10
    Thank you all for your replies. It's much easier that way.
     
    ahelpinghand, Apr 15, 2007 IP
  11. htmlindex

    htmlindex Prominent Member

    Messages:
    11,748
    Likes Received:
    284
    Best Answers:
    0
    Trophy Points:
    315
    #11
    Php Include pages are fine.
     
    htmlindex, Apr 15, 2007 IP
  12. qardinal

    qardinal Peon

    Messages:
    333
    Likes Received:
    15
    Best Answers:
    0
    Trophy Points:
    0
    #12
    i think everybody should display ads with a php include, it's the best way to try new formats and all that ish. also, since it's a server side operation i don't think there's anyway for adsense or google to know it's been included anyways.
     
    qardinal, Apr 15, 2007 IP
  13. alexdale

    alexdale Active Member

    Messages:
    989
    Likes Received:
    8
    Best Answers:
    0
    Trophy Points:
    60
    #13
    I agree 100%, its perfectly fine. I've been doin this for the past 2 years and i've had my sites reviewed by adsense reps and they said its perfect, no problems at all. And it's much easier to change your ads format this way if you got 100s or 1000s of pages. :) Imagine changing all of those pages one-by-one manually everytime you want to modify all your ads from all your pages. :eek:
     
    alexdale, Apr 15, 2007 IP