php die

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
User avatar
Vegan
Forum Regular
Posts: 574
Joined: Fri Sep 05, 2008 3:34 pm
Location: Victoria, BC
Contact:

php die

Post by Vegan »

I was wondering, how to deal with jerks who disable javascript to try to block ads on my sites

so my thinking is to use the HTML tags

Code: Select all

<noscript>
<p>This site site requires JavaScript to function properly</p>
<?php
die();
?>
</noscript>
and then refuse to display the page

do search engines care, if so, any suggestions to cope with this threat
Hardcore Games™ Legendary is the Only Way to Play™
My site is powered by LAMP
User avatar
Celauran
Moderator
Posts: 6427
Joined: Tue Nov 09, 2010 2:39 pm
Location: Montreal, Canada

Re: php die

Post by Celauran »

Honestly, I'd just let them through. It's going to be a small percentage who do that, and the time you spend trying to "beat" them will likely be worth more than whatever revenue you're potentially missing out on.
User avatar
Vegan
Forum Regular
Posts: 574
Joined: Fri Sep 05, 2008 3:34 pm
Location: Victoria, BC
Contact:

Re: php die

Post by Vegan »

I use a lot of scripts on my site, all the pages are assembled from other parts
Hardcore Games™ Legendary is the Only Way to Play™
My site is powered by LAMP
Post Reply