dealing with hosts files etc
Moderator: General Moderators
dealing with hosts files etc
I have now developed some strong countermeasures to ad block users, this is a growing problem that is best described as pervasive
I used a google custom job to show the use of ad blockers, it was not pretty
one angle that comes to mind is the growing use of HOSTS files to block domains etc
so I was wondering if there is any easy way to identify if the URL is not working with PHP which can then echo the result
I was also pondering using hard coded IP addresses as well
I used a google custom job to show the use of ad blockers, it was not pretty
one angle that comes to mind is the growing use of HOSTS files to block domains etc
so I was wondering if there is any easy way to identify if the URL is not working with PHP which can then echo the result
I was also pondering using hard coded IP addresses as well
Hardcore Games™ Legendary is the Only Way to Play™
My site is powered by LAMP
My site is powered by LAMP
Re: dealing with hosts files etc
PHP can't do anything about this - the problem is entirely client-side.
With a hosts file entry, pretty much any request to a blacklisted domain will fail. You can have Javascript check for that. Or check if a referenced variable in an ad script was defined. But your options are limited as you can't use Javascript to hit up another domain unless they've specifically allowed it.
With a hosts file entry, pretty much any request to a blacklisted domain will fail. You can have Javascript check for that. Or check if a referenced variable in an ad script was defined. But your options are limited as you can't use Javascript to hit up another domain unless they've specifically allowed it.
Re: dealing with hosts files etc
can PHP find the IP address of a given URL so I can use that to assemble ads by hard coded IP address to circumvent the HOSTS
Hardcore Games™ Legendary is the Only Way to Play™
My site is powered by LAMP
My site is powered by LAMP
Re: dealing with hosts files etc
That wouldn't help: an IP address corresponds to a server, not to a website, and nowadays most servers provide more than one site at a time. When the browser requests //ads.example.com/ad.js it will send two pieces of information to the server: the path (/ad.js) and the hostname (ads.example.com). The server needs the right hostname to know the right site to use. If the hostname is just an IP address then the server doesn't know which of the number of sites it has configured that the request should go to.
For example, http://www.devnetwork.net and forums.devnetwork.net go to the same server, 68.168.223.237, and if you go there then the server won't know what to do and will give you a generic error message. (Another possibility is that it would just pick the "first" site it has configured, but that would be a poorly configured web server.)
For example, http://www.devnetwork.net and forums.devnetwork.net go to the same server, 68.168.223.237, and if you go there then the server won't know what to do and will give you a generic error message. (Another possibility is that it would just pick the "first" site it has configured, but that would be a poorly configured web server.)
Re: dealing with hosts files etc
i suspect Amazon has a dedicated server for their ad host
Hardcore Games™ Legendary is the Only Way to Play™
My site is powered by LAMP
My site is powered by LAMP
Re: dealing with hosts files etc
Which domain name? It's pretty easy to check.
Re: dealing with hosts files etc
ws-na.amazon-adsystem.com
Hardcore Games™ Legendary is the Only Way to Play™
My site is powered by LAMP
My site is powered by LAMP
Re: dealing with hosts files etc
So I can't confirm whether the server hosts multiple sites, but I can try finding some random URL online and seeing if that works with an IP address.
And it isn't.
Try the same with one of your URLs to see if the IP address works.
And it isn't.
Code: Select all
http://ws-na.amazon-adsystem.com/widgets/q?ServiceVersion=20070822&Operation=GetAdHtml&ID=OneJS&OneJS=1&source=ss&ref=ss_til&ad_type=product_link&tracking_id=woodandshop-20&marketplace=amazon®ion=US&placement=B001ONHUAA&asins=B001ONHUAA&show_border=true&link_opens_in_new_window=true&MarketPlace=USCode: Select all
http://176.32.100.230/widgets/q?ServiceVersion=20070822&Operation=GetAdHtml&ID=OneJS&OneJS=1&source=ss&ref=ss_til&ad_type=product_link&tracking_id=woodandshop-20&marketplace=amazon®ion=US&placement=B001ONHUAA&asins=B001ONHUAA&show_border=true&link_opens_in_new_window=true&MarketPlace=USRe: dealing with hosts files etc
It looks like the IP address does not work as desired
so much for that idea
any other suggestions to get around blocking with HOSTS
so much for that idea
any other suggestions to get around blocking with HOSTS
Hardcore Games™ Legendary is the Only Way to Play™
My site is powered by LAMP
My site is powered by LAMP
Re: dealing with hosts files etc
Not really. You can still do the Javascript detection and present a message about allowing ads on your site.
Re: dealing with hosts files etc
Unfortunately it does seem that all I can do is use JS, other ideas have come up short
I am using this idea now, send miscreants to Chilling effects where DCMA is taken more seriously
Recently 275,000 requests on a single day makes me wonder what is wrong? That happened on October 26, 2015
I am using this idea now, send miscreants to Chilling effects where DCMA is taken more seriously
Code: Select all
if(window.isAdsDisplayed === undefined ) {
// AdBlock is enabled. Show message or track custom data here
busted = document.cookie; // check for an existing cookie
if (busted) {
href = "https://www.chillingeffects.org/";
else {
document.cookie("adblock=true");
alert("An ad blocker has been detected. Please remove the program to use this site. This is an ad supported small business.\n Ad blocking destroys web content which needs a revenue source to survive.\n Adblockers and click fraud have cause so much economic damage that many sites have been forced to close.\n Your webmaster needs to eat too, let alone the cost of web hosting etc. \n\n This site cannot afford to to use a higher service level when traffic is heavy.");
}
}
Hardcore Games™ Legendary is the Only Way to Play™
My site is powered by LAMP
My site is powered by LAMP
Re: dealing with hosts files etc
Yeah... That's definitely the best way to make sure I remove your site from my search results and never go back to it again.
Re: dealing with hosts files etc
I have seen a sharp increase in page views, looks like this is working properly with the desired effectrequinix wrote:Yeah... That's definitely the best way to make sure I remove your site from my search results and never go back to it again.
Page views are now up more than 2x and I am tracking the use of adblock against my ads to see how its working
Hardcore Games™ Legendary is the Only Way to Play™
My site is powered by LAMP
My site is powered by LAMP