I need a script so that my friends...

Discussion in 'AdSense' started by daisukey, May 6, 2006.

  1. #1
    Hi guys, I need a script so that my friends in the same flat don't click on my ads.

    I have seen 2 scripts to stop showing ads from the same ip in this forums, I had tried one which didn't work. I'm looking for the other one, but I can't seem to find it anymore. Could someone help me?

    thanks.
     
    daisukey, May 6, 2006 IP
  2. daisukey

    daisukey Peon

    Messages:
    35
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    daisukey, May 6, 2006 IP
  3. jackburton2006

    jackburton2006 Peon

    Messages:
    5,296
    Likes Received:
    282
    Best Answers:
    0
    Trophy Points:
    0
    #3
    jackburton2006, May 6, 2006 IP
  4. daisukey

    daisukey Peon

    Messages:
    35
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #4
    ahh thanks jack.. you always seem to help me. I appreciate it.
     
    daisukey, May 7, 2006 IP
  5. tonyinabox

    tonyinabox Peon

    Messages:
    1,988
    Likes Received:
    42
    Best Answers:
    0
    Trophy Points:
    0
    #5
    seem that your friends in the same flat always visit your website, uh?

    just wonder what kind of website. forum for people in the same flat? :D
     
    tonyinabox, May 7, 2006 IP
  6. daisukey

    daisukey Peon

    Messages:
    35
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #6
    hi guys, just got time to play with the coding.


    1. "pub-xxxxxxxxxxxxxxxx"; xxxxxxxxxxxxxxxx is my client ID?

    2. "pub-1234567891234567"; 1234567801234567 is where my client ID goes right?

    3. Where do I put this code? in the <head></head>? or after the ?>
    <script type="text/javascript"><!--
    google_ad_client = "<?php echo $AdSenseAccount;?>";

    4. The code seems to be missing </script> do I need it?

    5, finally the final code should lookk like this?

    
    <script type="text/javascript"><!--
    $AdSenseTest =    "pub-my client id";
    $AdSenseAccount = "pub-my client id";
    $callingIP = $_SERVER["REMOTE_ADDR"];
    $myIP = "my ip will b here";
    
    if(ereg( $myIP, $callingIP)) { $AdSenseAccount = $AdSenseTest; }
    
    google_ad_client = "pub-my client id";
    google_ad_width = 336;
    google_ad_height = 280;
    google_ad_format = "336x280_as";
    google_ad_type = "text";
    google_ad_channel ="7722011399";
    google_color_border = "F4F4F4";
    google_color_bg = "F4F4F4";
    google_color_link = "7F7F7F";
    google_color_url = "940F04";
    google_color_text = "808080";
    //--></script>
    <script type="text/javascript"><!--
    google_ad_client = "<?php echo $AdSenseAccount;?>";
      src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
    </script>
    
    Code (markup):
     
    daisukey, May 14, 2006 IP
  7. tonyinabox

    tonyinabox Peon

    Messages:
    1,988
    Likes Received:
    42
    Best Answers:
    0
    Trophy Points:
    0
    #7
    here I give you a hint.

    - use a dynamic dns free service. [try dyndsn.com]
    - install a dynamic dns client on your computer.
    - your script checking ip address from the dynamic dns hostname compare with visitor ip address.
    - replace with a transparent.gif image if the ip address matched
    - display ads if not match
    - you have an option to make a script to set cookie only on your computer if you want to see the ads only on your computer.

    if you can't do the whole thing then hire me for $30 LOL
     
    tonyinabox, May 14, 2006 IP
  8. frisby

    frisby Well-Known Member

    Messages:
    1,378
    Likes Received:
    39
    Best Answers:
    0
    Trophy Points:
    140
    #8
    frisby, May 14, 2006 IP
  9. bflora

    bflora Active Member

    Messages:
    245
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    83
    #9
    Is there any financial advantage to not having ads show on your own machine? i.e. less views and so a higher CTR on your ads if they're not displaying for you but only for other visitors?
     
    bflora, May 14, 2006 IP
  10. misohoni

    misohoni Notable Member

    Messages:
    1,717
    Likes Received:
    32
    Best Answers:
    0
    Trophy Points:
    200
    #10
    Or suggest using something like Phpadsnew where you can rotate the ads, show the ads per hour, month etc., for each specific IP...might be a bit complex if you are novice
     
    misohoni, May 14, 2006 IP