How to Block Google Adsense?

Discussion in 'PHP' started by black.hat, Feb 13, 2010.

  1. #1
    How i can block Google Adsense in my Website?

    Is there any HTML or PHP code i can past in my website to block Google Adsense to be shown?

    Thanks :)
     
    black.hat, Feb 13, 2010 IP
  2. Will Bontrager

    Will Bontrager Peon

    Messages:
    14
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Removing the AdSense JavaScript from the web page prevents the ads from printing.

    Will
     
    Will Bontrager, Feb 13, 2010 IP
  3. black.hat

    black.hat Active Member

    Messages:
    157
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    53
    #3
    I know removing adsense code will remove the ads lol, but i don't have access to that part.
     
    black.hat, Feb 13, 2010 IP
  4. ChaibiAlaa

    ChaibiAlaa Peon

    Messages:
    190
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Then you want to block adsense for a page you don't have access to ?
     
    ChaibiAlaa, Feb 13, 2010 IP
  5. black.hat

    black.hat Active Member

    Messages:
    157
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    53
    #5
    Yeah something like that, i do have access to the page, but its not allowing me to remove/change anything, its just allow me to add code.

    a simple code that can block google adsense will be great, PHP or HTML or Java
     
    black.hat, Feb 13, 2010 IP
  6. ChaibiAlaa

    ChaibiAlaa Peon

    Messages:
    190
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #6
    It have nothing to do with PHP, HTML, I don't know I think you will be using this on a fraudulent activity .. just a feeling ..
     
    ChaibiAlaa, Feb 13, 2010 IP
  7. black.hat

    black.hat Active Member

    Messages:
    157
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    53
    #7
    It's really not your business dude, when you can't help there is really no needs to wast people time with your stupid feels lol
     
    black.hat, Feb 13, 2010 IP
  8. ChaibiAlaa

    ChaibiAlaa Peon

    Messages:
    190
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #8
    When replying to stupid threads will depend on you, I will ask your permission :) Now at little I'm sure of your intentions, and I can help, but will not help Stupid replies :)
    Reported.
     
    ChaibiAlaa, Feb 13, 2010 IP
  9. black.hat

    black.hat Active Member

    Messages:
    157
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    53
    #9
    I am even unable to understand your English lol.

    GoodLuck............. ;)
     
    black.hat, Feb 13, 2010 IP
  10. ChaibiAlaa

    ChaibiAlaa Peon

    Messages:
    190
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #10
    Better to let stupid repliers ignorant :D
    Good luck to you too :D
     
    ChaibiAlaa, Feb 13, 2010 IP
  11. SmallPotatoes

    SmallPotatoes Peon

    Messages:
    1,321
    Likes Received:
    41
    Best Answers:
    0
    Trophy Points:
    0
    #11
    He is using free hosting that automatically puts AdSense on his page, or something similar to that.
     
    SmallPotatoes, Feb 14, 2010 IP
  12. wisdomtool

    wisdomtool Moderator Staff

    Messages:
    15,826
    Likes Received:
    1,367
    Best Answers:
    1
    Trophy Points:
    455
    #12
    I would urge all posters to respect each other. If you really feel like posting rude or harassing replies, do note that you will definitely receive infraction.
     
    wisdomtool, Feb 14, 2010 IP
  13. n3r0x

    n3r0x Well-Known Member

    Messages:
    257
    Likes Received:
    4
    Best Answers:
    1
    Trophy Points:
    120
    #13

    Then would just change host, or use a javascript to remove the google ads / replace the adcode to mine..:p
    But first try to find a free host without advertising.
     
    n3r0x, Feb 14, 2010 IP
  14. Kirill120

    Kirill120 Greenhorn

    Messages:
    86
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    16
    #14
    i have a feeling that your`e using a free hosting and want to disable the adsense they provide, am i right?

    if yes, can you tell me in what area of the site the adsense appear?(header, footer and etc.).
     
    Kirill120, Feb 14, 2010 IP
  15. black.hat

    black.hat Active Member

    Messages:
    157
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    53
    #15
    No i am not using free web hosting, i already own 7 dedicated servers,
    i share other companies news in my website.
    the problem is that when i grab their news content to my website, its included some adsense, i am looking for a code that can block those ads, because as you know its slow down the website.
     
    black.hat, Feb 15, 2010 IP
  16. danx10

    danx10 Peon

    Messages:
    1,179
    Likes Received:
    44
    Best Answers:
    2
    Trophy Points:
    0
    #16
    Post the code which grabs their content here. So we can possibly use some regex to remove the adsense code.
     
    danx10, Feb 15, 2010 IP
  17. black.hat

    black.hat Active Member

    Messages:
    157
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    53
    #17
    It's not a short code, there is about 2-3 page of codes, i am not sure which part of codes i need to pos.

    I can't post all of the codes here...

    PM me if you can help, so i can email you those pages.....
     
    black.hat, Feb 16, 2010 IP
  18. dnsman

    dnsman Peon

    Messages:
    30
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #18
    with css.. if google ads position after <body> you can use in style.css .body {margin-top:-30px};
    This is easy.:) (Sorry for my bl4ck nglish..)
     
    dnsman, Feb 17, 2010 IP
  19. wmtips

    wmtips Well-Known Member

    Messages:
    601
    Likes Received:
    70
    Best Answers:
    1
    Trophy Points:
    150
    #19
    So your content scraper isn't smart enough to remove all scripts, including Adsense? :D Beware, besides Adsense this scraped content could contain javascript statistics counters etc.

    You can delete all scripts with regex like this

    $s = preg_replace ('/<script.*?<\/script>/si', '', $s);
    PHP:
     
    wmtips, Feb 17, 2010 IP