Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 9 of 9
01-07-2008, 05:20 AM #1
Allowing members to place no more than 2 Adsense like Ads on same page
We serve Adsense like Ads ( Free Clickbank Ads ) on the web pages of our members.
For your reference : http://cbtopsites.com/affiliates/cbadscode.php
We have mentioned on the site not to paste the code more than twice on the same page.
However, some members are pasting the Ads code too many times on the same page. ( some have pasted it more than 10 times )
That is causing problem to our server.
I have been visiting the web pages of members everyday to see if they are pasting too many ads, but it is a tedious process.
Is there any way to display the Ads only twice on a page
and display some other text on the extra Ads?
Hope you understood the problem.
Please suggest possible solutions.
Last edited by student; 01-07-2008 at 05:24 AM.
01-07-2008, 01:41 PM #2
- Join Date
- Jun 2003
- Cottage Grove, Minnesota
- Thanked 1,075 Times in 1,066 Posts
Show us one of your member's page that has more than two ads.
01-07-2008, 02:36 PM #3
You will find 403 forbidden message in the place of the Ads.
( he may remove the code anytime )
That person has pasted the code fourteen times on the same page of his blog.
Due to this problem, mysql slow queries log and cpu exceeded log are increasing.
01-07-2008, 03:16 PM #4
As a simple test, you could detect how many server requests for the contents of the iFrame(s) are being submitted by a single referer at "once" (in reality, time dither required) - too many requests per referer (i.e. more than two) = automatically block the domain and send a warning email.
If your clients really want to abuse the system they would then be able to do so by forging the referer, but I think the method I've suggested would probably fix 90% of your problems ... although I don't know how dedicated/evil your customers are!
Another, more robust but more complex solution would be to CURL in each and every one of the client's pages and parse them all for inclusion of your iFrame (more complex because you would need to parse the markup) - you would only need to do this periodically (and ideally randomly so as to be unpredictable) and deny access accordingly.
Last edited by mlse; 01-07-2008 at 03:24 PM.
01-07-2008, 03:28 PM #5
01-07-2008, 03:32 PM #6
CURL stands for Client URL ... very useful. Here's the documentation: http://uk3.php.net/manual/en/ref.curl.php
Mind you, in the first instance I would just knock up a quick script to record the number of requests per referer over a period of say 2 or 3 days, just to get an idea of the size of the problem. Indeed, this information should already be present in your server's logfiles. You might be able to manually manage the problem adequately with a simple solution like that rather than going for a more complex one.
Last edited by mlse; 01-07-2008 at 03:36 PM.
01-07-2008, 04:26 PM #7
01-07-2008, 04:32 PM #8
Firstly, look in your logfile - that info should be in there already - you will need to mine the data and your webhost may provide logfile analysis tools as part of your hosting package.
If that bears no fruit, then off the top of my head ...
Record $_SERVER[HTTP_REFERER] and time of request ... if you see a whole load of requests for your advert pages bunched together in a very small space of time (less than a second) from the same referer then there's a good chance that page has too many ads on it.
Users who have thanked mlse for this post:
01-07-2008, 04:44 PM #9
Thank you very much
I will follow for your suggestions.