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.

display ads in password protected pages

Discussion in 'Placement / Reviews / Examples' started by PinoyIto, Feb 20, 2006.

  1. #1
    Hey guys, just want to ask how to get correct ads displayed in my password protected pages.

    I want to display ads on my members area pages, there are ads displaying but not relevant to the content of the pages and some times no ads.

    I have seen sites with members area displaying adsense ads related to the page content
     
    PinoyIto, Feb 20, 2006 IP
  2. noppid

    noppid gunnin' for the quota

    Messages:
    4,246
    Likes Received:
    232
    Best Answers:
    0
    Trophy Points:
    135
    #2
    When my site was young, those wnet wrong for me to. So I tunred them off.

    However there came a time, much later, that I put up an ad that showed in private forums. The general topic was used for the ads. I was pleased.

    So I dunno if that helps or if there are better ways, but that was my experience.
     
    noppid, Feb 20, 2006 IP
  3. PinoyIto

    PinoyIto Notable Member

    Messages:
    5,863
    Likes Received:
    170
    Best Answers:
    0
    Trophy Points:
    260
    #3
    I tried this on

    function robot()
    {
    global $HTTP_USER_AGENT, $REMOTE_ADDR;
    if(stristr($HTTP_USER_AGENT,"Mediapartners-Google/2.1")) return true;
    }


    if(robot())
    {
    echo "
    Text that is related to the page content here
    ";
    }
    else
    {
    //if not a robot... then require to logon...
    include "log.php";
    }
     
    PinoyIto, Feb 20, 2006 IP
  4. fgs

    fgs Peon

    Messages:
    967
    Likes Received:
    22
    Best Answers:
    0
    Trophy Points:
    0
    #4
    excellent trick
     
    fgs, Feb 21, 2006 IP
  5. Hemanth

    Hemanth Active Member

    Messages:
    310
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    60
    #5
    Great work PinoyIto. A cool piece of code..
     
    Hemanth, Apr 10, 2006 IP