@clarkwinkelmann Hi, I made this adsense banner blocking script when it comes from a private website and doesn't display the ads.
<?php
// block Google AdSense start
if (file_exists("block/".$_SERVER['HTTP_REFERER'].".txt")) {
// Do not show Google Adsense banner
?>
Here it doesn't show
<?php
}
else{
// Show Google AdSense banner
?>
Here shows the AdSense ad
<?php }
// blocking end display of Google AdSense
?>
To block a user who posts on a site that has a private account.
I put it in my forum directly in the file vendor/flarum/core/views/frontend/forum.blade.php
It's working fine, it blocks more the reference comes through php ($_SERVER['HTTP_REFERER'])
and when the user browses it doesn't show the ad anymore it's because the page is managed with javascript and I also have a reference in scripts that get the domain where the user comes from (<script>document.write(window.location.referrer);</script>)
but i just need the domain without https:// who can help me make these scripts just show me the domain?