1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

Adding Google Adsense to every users pages (on free webhosting)

Discussion in 'Programming' started by juice99, Jul 12, 2005.

  1. #1
    Im running free webhosting server. Im trying to add Adsense ads on every users page, but its very nasty if user has page with frames (it ads to every page, so it can be 2 or 3 times on the same page). Not only its agaisnt Google TOS i think, but also it looks ugly.
    I also, have to run the same code for every page. I mean with frames or not. So i thought - what if this script will check window height and width, and if its more than lets say 500x350 or something like that, then it will run this Google Adsense script, and if not, it will not run it :)

    So even if this code adds itself to menu.html, it will not run becouse usually people dont make menu frames bigger than content frames :) And if it adds itself to page without frames - no problem, becouse window is always bigger than 500x350. And if its inside content.html from pages with frames, it should run once, becouse usually only one frame is so big

    What do you think, is it possible, and if yes, maybe someone have seen such thing? i was looking for it on hotscripts.com, or just googling, but without any luck
     
    juice99, Jul 12, 2005 IP
  2. Perrow

    Perrow Well-Known Member

    Messages:
    1,306
    Likes Received:
    78
    Best Answers:
    0
    Trophy Points:
    140
    #2
    What do you do if the user has added his own ad-sense to his page?
     
    Perrow, Jul 12, 2005 IP
  3. Permoney

    Permoney Active Member

    Messages:
    360
    Likes Received:
    28
    Best Answers:
    0
    Trophy Points:
    70
    #3
    i think if you send an email to adsense you can do it but i am not sure:)
     
    Permoney, Jul 12, 2005 IP
  4. dct

    dct Finder of cool gadgets

    Messages:
    3,132
    Likes Received:
    328
    Best Answers:
    0
    Trophy Points:
    230
    #4
    The other thing to watch if you're doing this automatically and not manually validating, is the hosted site abiding Google's TOS.
     
    dct, Jul 12, 2005 IP
  5. juice99

    juice99 Guest

    Messages:
    68
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #5
    Google already told me its ok, and i saw many diffrent topics that this is ok, and Google has nothing agaisnt it. i was wondering, is it possible from the technical point of view and maybe do you know such script
     
    juice99, Jul 12, 2005 IP
  6. dct

    dct Finder of cool gadgets

    Messages:
    3,132
    Likes Received:
    328
    Best Answers:
    0
    Trophy Points:
    230
    #6
    I'm sure it's possible but don't know of any scripts I'd be very interested to hear how you get on :)
     
    dct, Jul 12, 2005 IP
  7. exam

    exam Peon

    Messages:
    2,434
    Likes Received:
    120
    Best Answers:
    0
    Trophy Points:
    0
    #7
    If I were you, I'd be really careful to abide by the TOS... but that's your call. To implement it, you could put the entire user's page into a frameset, with your add at the top in one frame and the page below in another frame.
     
    exam, Jul 12, 2005 IP
  8. juice99

    juice99 Guest

    Messages:
    68
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #8
    im not sure if this is the best idea... what about Google bots, wont they index only my forced html with framesets ? and what if someone is already in such page and will click on "MAIN PAGE"... it would load this frame again...

    i mean its doable, but thats seems like a very complicated project, that will check url refferer and stuff like that (and some people doesnt even show their referer - so i wont know from where they came from and i could load my frame with ads again)

    i've seen this on 1 or 2 free hosting sites - it was very messy. (websamba i think and one other site)

    after few clicks my page was full of their ads, to the point that it was unreadable.
     
    juice99, Jul 13, 2005 IP
  9. exam

    exam Peon

    Messages:
    2,434
    Likes Received:
    120
    Best Answers:
    0
    Trophy Points:
    0
    #9
    Use javascript, just check screen width and height and if the window is big enough, call the adsense code, otherwise don't. See here
     
    exam, Jul 13, 2005 IP
  10. jimrthy

    jimrthy Guest

    Messages:
    283
    Likes Received:
    13
    Best Answers:
    0
    Trophy Points:
    0
    #10
    I remember seeing this same thread on another forum a year or so ago. Assuming you're using Apache, the correct way to do this involves fiddling with some of the configuration files. I don't remember any of the details (or even have thoughts about what terms to google, really).

    Everyone was making these sort of kludgy suggestions until someone popped up and said "Here's the answer, you dimwits." It's hard to find, but it's a very clean, elegant solution.
     
    jimrthy, Jul 21, 2005 IP