Forum Moderators: martinibuster
I run a free hosting site with AdSense placed on all pages. Some users find ways of:
a) completely removing the adsense code
b) putting a javascript that stops the ads from loading
c) place their own adsense banners on the pages
I want to write a script/spider that can go through all the pages hosted by me and detect if "a" or "b" or "c" is being done.
Can someone give some suggestion?
How can I scan and locate pages which have tampered with the adsense code?
Thanks in advance!
You have no control against every sort of possible TOS violations.
Free homepages can have usual
* copyright problems offering MP3
* racist or related materials
* all other material prohibited by TOS
So I suggest to change to a stable long time business model with AdSense.
If you don't have an answer to my question, don't post in this thread.Duh.
Anyway it's not clear what you're asking. You already laid out exactly what you need to do. Download one of the many free spiders available or run a script on your own server to locate all the web pages, then write a program in whatever programming language you wish to scan them. Certainly (a) and (c) should be trivial to detect. What part of this don't you know how to do?
Do you require each page to include a specific link or embed it? What type of pages, PHP, ASP, HTML?
If I had something like this, presuming all pages are HTML or PHP, all files are on hard drive(s), and my Adsense script is provided to the users as a "link" to an "include file", verses the complete script.
You can use a script to grep or cqp for the lack of Adsense link/code in each HTML/PHP/ASP/whatever file and pipe results into an other file. you can put this up as a cron job, and just sendmail the results to your mailbox.
[edited by: Tapolyai at 6:21 pm (utc) on Nov. 16, 2005]