Help, i'm new to this php stuff and trying to remove all of the "G" adsense from entire site. I was able to get index.php and .html de-geegled but can't get rid of ads on subsequent content pages. Any magic bullet around?
If you are using indexx.php it sounds like you are using some kind of CMS. There should be a template for the content pages. Go into the tmeplate directpory and use grep to so if you can find files with the AdSense code. Try: grep -il "google_ad_client" *.* That will output a list of offending files. You can then edit by hand. If AdSense is hard coded into 10,000 pages, then you will want to write some kind of script to handle the job. Perl would work nicely for the task.
Sorry to have not dropped back in a couple of days. You need to go to a command prompt in linix or unix and cd (change directory) into the directory which contains your templates and type grep -il "google_ad_client" *.* grep is command line utility available on Linux, Unix and Macs. There are also versions available for windows. If you are on a windows computer, just use the Find program and look for all pages in the template directory with contains the phrase "google_ad_client"
Thanks Clancey, i'll give it a whirl when I get to a PC that allows heavily scripted pages to show.i.e. I can't get to my cpanel...
I might even pay for something like that if it worked Doesn't seem to be any readily available code to do this at all. I've played with grep a bit but I don't want to take a chance on messing up 14 gig and 30 domains just to get rid of adsense. All I really need to remove is the script calls. <script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"> </script> Code (markup): The rest doesn't matter if it stays there.
You can find a command line program in perl which does the trick. I use it. http://193.125.152.107/pub/unix/search/sar I do not know how long there are going to be copies of this tool in archives. The author got fairly involved with Linux and open source projects between 1998 and 2000, but seems to have dropped out of sight since that time. To use it, place the script in an easy to remember location and run it like thus, with everything on a single line: perl /home/ME/sar.pl "src=\"http://pagead2.googlesyndication.com/pagead/show_ads.js\"" "" *.html By getting rid of the src=" segment it will neuter the script and you should be de-G'ed. To test, make a copy of a single file. Run it against that file and open it in a browser.