How to Block Adsense Ads in an Office?

Discussion in 'AdSense' started by webmaster-32B2, May 13, 2010.

  1. #1
    Hi,

    I want to know how to block Google Ads in an office where people use different Web Browsers?

    Any help will be appreciated.

    Regards
    WM
     
    webmaster-32B2, May 13, 2010 IP
  2. JamesColin

    JamesColin Prominent Member

    Messages:
    7,874
    Likes Received:
    164
    Best Answers:
    1
    Trophy Points:
    395
    Digital Goods:
    1
    #2
    If your office has a unique ip, you can hide the ads for this ip, directly on your site, with php.
     
    JamesColin, May 13, 2010 IP
  3. baccifinejewelry

    baccifinejewelry Peon

    Messages:
    423
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #3
    wow..that's new to me...I never heard about that.
     
    baccifinejewelry, May 13, 2010 IP
  4. joliber

    joliber Peon

    Messages:
    164
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #4
    hello, can you show us an code snippet for hiding the ads on a particular ip? Have you used it already?

    Thanks for the help in advance..
     
    joliber, May 14, 2010 IP
  5. JamesColin

    JamesColin Prominent Member

    Messages:
    7,874
    Likes Received:
    164
    Best Answers:
    1
    Trophy Points:
    395
    Digital Goods:
    1
    #5
    the ip will be in php variable $_SERVER['REMOTE_ADDR']

    so if your office ip is 234.234.234.234 you could do a simple:
    
    <?php
    $ip=$_SERVER['REMOTE_ADDR'];
    if ($ip != '234.234.234.234') {
    ?>
    YOUR ADSENSE CODE HERE
    <?php
    }
    ?>
    
    Code (markup):
    and no I've never used it because I'm not in an office and I don't click my own ads (and rarely others) and have become expert at spotting them in webpages :)
     
    JamesColin, May 14, 2010 IP
  6. gjivan

    gjivan Active Member

    Messages:
    469
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    85
    #6
    USe firefox latest version. go to tools--->options--->content and there unmark the "Enable javascript Tab".. This is as simple like this!!..And as far as various browsers concerned, instead of trying php codings, install firefox in all computers ( more secure,more safe and more fast )
     
    gjivan, May 14, 2010 IP
  7. Project Mobius

    Project Mobius Peon

    Messages:
    10,524
    Likes Received:
    170
    Best Answers:
    0
    Trophy Points:
    0
    #7
    block ads? don't surf at work
     
    Project Mobius, May 14, 2010 IP