Welcome to WebmasterWorld Guest from

Forum Moderators: incrediBILL & martinibuster

Message Too Old, No Replies

phpBB and Google AdSense

Let AdSense see your private forums



1:37 am on Jan 16, 2004 (gmt 0)

10+ Year Member

I've had a few private messages about a posting I made here a while back: I've managed to allow Google AdSense to see inside my private forums, so theoretically it is able to give relevant ads for each topic.

explains a little of what I've done. Since it's a glaring security hole, I'm reluctant to post my *actual* code: it only checks on IP address, not on user agent right now, and I think it might be spoofable; and it would reveal the session ID I've used for Googlebot. However, it ought to give you a few ideas about how you'd achieve this for yourself.

According to an e-mail from Google tech support, while this is technically cloaking, this is acceptable behaviour, and they gave me IP addresses and user agents to help me in my quest (which you'll find in this forum).

I can report that it has worked well in the past; the fake session has been deleted though. I suspect this is because it has logged itself out somehow - it does follow all the links on the page. I'm now writing a bit of code to allow the system to recreate this session.


7:40 pm on Jan 16, 2004 (gmt 0)

WebmasterWorld Senior Member jenstar is a WebmasterWorld Top Contributor of All Time 10+ Year Member

Thanks for posting this, I know there are many here who run AdSense on phpbb boards and would find this useful.


2:47 pm on Jan 17, 2004 (gmt 0)

10+ Year Member

There is nothing more annoying than finding a webpage indexed that you can't access without registering.

Thank god for the google cache.


3:20 pm on Jan 17, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member

Jason, the Google Mediapartners bot doesn't index pages so you won't find them at google if they are private (and the standard Googlebot is disallowed).

What james has posted is a helpfull hint how to let mediapartners bot crawl your private phpbb forums and let it detect the topic of the private forum pages - to be able to publish relevant AdSense ads instead of PSA's.


3:49 pm on Jan 17, 2004 (gmt 0)

10+ Year Member

My sincere apologies - I misread his post. For adsense on private forums, this would be a good thing(tm).

Featured Threads

Hot Threads This Week

Hot Threads This Month