Re: the php code that garyr_h posted a few days ago:
It references a service on netgeo.caida.org and this is a warning from the actual netgeo page:
NOTE: NetGeo has not been actively maintained for several years, and this will probably not change in the foreseeable future. As a result, there are several known major issues affecting accuracy and service availability. Please be warned that NetGeo may give wildly incorrect results, especially for recently allocated or re-assigned IP addresses.
Indeed, I just tried it with the IP of my server, which is in Connecticut, and netgeo said it was in Australia.
I just added some code to my own site to filter my YPN ads using jomaxx's list (thanks jomaxx!)