Advertisement:

Author Topic: Mod for blocking bot traffic  (Read 609 times)

Offline Xpresskonami

  • Jr. Member
  • **
  • Posts: 324
  • Gender: Male
Mod for blocking bot traffic
« on: November 28, 2020, 02:42:05 AM »
Is there any mod for blocking bot traffic. This bot traffic is really causing fake Ad click fraud. How can stop the fake bot traffic from coming to website and block them from giving fraud ad clicks?

Online vbgamer45

  • Customizer
  • SMF Super Hero
  • *
  • Posts: 23,417
    • smfhacks on Facebook
    • VBGAMER45 on GitHub
    • @createaforum on Twitter
    • SMF For Free
Re: Mod for blocking bot traffic
« Reply #1 on: November 28, 2020, 09:53:40 AM »
Do you know which ip's are causing it? If it is bot traffic for click fraud the ad network should filter it out.
We could block certain countries if it is a geo level and or proxies.
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

Offline Xpresskonami

  • Jr. Member
  • **
  • Posts: 324
  • Gender: Male
Re: Mod for blocking bot traffic
« Reply #2 on: November 28, 2020, 09:56:55 PM »
Do you know which ip's are causing it? If it is bot traffic for click fraud the ad network should filter it out.
We could block certain countries if it is a geo level and or proxies.

The Geo was from Ireland and Germany. I get huge pageviews on my Google analytics & AdSense like 4000+ pageviews and 0 clicks. And sometimes I got lot of clicks from this two Geo. And this always get my AdSense limited all the time. Please any way to stop the bot traffic.


Online vbgamer45

  • Customizer
  • SMF Super Hero
  • *
  • Posts: 23,417
    • smfhacks on Facebook
    • VBGAMER45 on GitHub
    • @createaforum on Twitter
    • SMF For Free
Re: Mod for blocking bot traffic
« Reply #3 on: November 28, 2020, 10:50:09 PM »
I use something like this to stop vpn/proxy traffic on some of my sites.  GEOIP you can use maxmind to stop bots.
Code: [Select]

function shapeSpace_block_proxy_visits() {

$headers = array('CLIENT_IP','FORWARDED','FORWARDED_FOR','FORWARDED_FOR_IP','VIA','X_FORWARDED','X_FORWARDED_FOR','HTTP_CLIENT_IP','HTTP_FORWARDED','HTTP_FORWARDED_FOR','HTTP_FORWARDED_FOR_IP','HTTP_PROXY_CONNECTION','HTTP_VIA','HTTP_X_FORWARDED','HTTP_X_FORWARDED_FOR');

foreach ($headers as $header){
if (isset($_SERVER[$header])) {
die('Proxy access not allowed.');
}
}
}



Another idea signup for cloudflare and blocks many bots just requires a dns change and they have a free plan
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

Offline Xpresskonami

  • Jr. Member
  • **
  • Posts: 324
  • Gender: Male
Re: Mod for blocking bot traffic
« Reply #4 on: November 29, 2020, 05:41:45 AM »
I use something like this to stop vpn/proxy traffic on some of my sites.  GEOIP you can use maxmind to stop bots.
Code: [Select]

function shapeSpace_block_proxy_visits() {

$headers = array('CLIENT_IP','FORWARDED','FORWARDED_FOR','FORWARDED_FOR_IP','VIA','X_FORWARDED','X_FORWARDED_FOR','HTTP_CLIENT_IP','HTTP_FORWARDED','HTTP_FORWARDED_FOR','HTTP_FORWARDED_FOR_IP','HTTP_PROXY_CONNECTION','HTTP_VIA','HTTP_X_FORWARDED','HTTP_X_FORWARDED_FOR');

foreach ($headers as $header){
if (isset($_SERVER[$header])) {
die('Proxy access not allowed.');
}
}
}



Another idea signup for cloudflare and blocks many bots just requires a dns change and they have a free plan

Thanks for your feedback. I already signed up for Cloudflare and I still keep seeing the bots. I was thinking maybe they comes from Opera news feed.

But please explain how I can use the Function code you drop and let me try and see if it going to stop it. Thanks once more

Online vbgamer45

  • Customizer
  • SMF Super Hero
  • *
  • Posts: 23,417
    • smfhacks on Facebook
    • VBGAMER45 on GitHub
    • @createaforum on Twitter
    • SMF For Free
Re: Mod for blocking bot traffic
« Reply #5 on: November 29, 2020, 09:59:49 AM »
That blocks common proxies/bots.
If you want to stop access completely.... You would add the function to either index.php or sources/subs.php
Then call it from index.php

I use this function on registration normally.
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro