OP 03 January, 2024 - 10:34 AM
Is your website facing the constant threat of bot attacks, data scraping, or malicious activities? If so, I want to share with you how I was able to overcome something like this.
In this tutorial about how to safeguard a website, I use website analytics and protection services from Moonito (https://moonito.net). Moonito is a comprehensive platform designed to offer powerful website analytics while simultaneously providing robust protection against unwanted and malicious activities.
How to Safeguard a PHP Websites
My website uses PHP, so in this tutorial, I will show you how to easily protect a PHP website using Moonito. If you use other programming languages in your website (e.g., Node.js, TypeScript, Python, Go, etc.,) you can read the instructions here: https://moonito.net/usage-guides
What does Moonito do? - divides visitors into 3 groups:
Search engine bots - bots of search engines, social networks, etc. You can also block this if you want.
Genuine visitors - The real visitors that visit your website.
Unwanted visitors - unnecessary bots, spambots, vulnerability checkers, parsers - do not reach the site.
Who needs Moonito's antibot magic?
1) For Medium to Large Sites and Heavy CMS Users (e.g., WordPress): Reduces server load, saving processor resources, RAM, traffic, and internet bandwidth.
2) To Combat Spam: Shields against spam in contact forms, posts, registrations on forums, and comments on blogs. Also prevents bots from generating spam orders in online stores.
3) Protection from Cyber Threats: Defends against vulnerability searches, XSS attacks, and brute force attempts on admin areas.
4) Content Security: Guards against content theft by parsers that create non-unique content on other websites. Blocks email address collection by automated tools.
5) Defense Against Analyzers: Protects from content analyzers like AhrefsBot, Majestic, SEMrushBot, and similar tools. Safeguards against price analyzers, SEO analyzers of competitors, RKN bots, and antiviruses.
6) Counter Advertising Fraud: Filters out bots that inflate impressions and clicks on ads, preventing skewed statistics on counters.
But, why do I love to use Moonito service to protect my website?
1) Moonito not only protects my website but also has good analytics features like Google Analytics.
2) Have advanced features to filter visitors like Device Whitelisting, Allowing Specific Countries, Blocking VPN/Proxy/Tor, Blocking Bad IPs, Block Non-ISP IPs, Block Satellite ISPs, Block Spiders/Crawlers, Block Bad Referrer, DNS Based Blocking, Block Bot IPs, Block Bot Hostnames, Request Header Analysis, Search Engine Control, Web Application Firewall, Security Level Control, AI-Powered, Behavior Analysis, and much more.
3) More cheaper than other similar services like BlockScripts, TrafficArmor, and Imperva.
4) There are often lots of discount offers every month.
There is a trial period for testing: 7 days after registration.
Details on the website https://moonito.net
If you have any questions, ask in this thread or just send me messages.
In this tutorial about how to safeguard a website, I use website analytics and protection services from Moonito (https://moonito.net). Moonito is a comprehensive platform designed to offer powerful website analytics while simultaneously providing robust protection against unwanted and malicious activities.
How to Safeguard a PHP Websites
My website uses PHP, so in this tutorial, I will show you how to easily protect a PHP website using Moonito. If you use other programming languages in your website (e.g., Node.js, TypeScript, Python, Go, etc.,) you can read the instructions here: https://moonito.net/usage-guides
- First, sign up for the domain you want to protect and learn about its visitors on Moonito's Analytics page.
- Download Moonito PHP Library and extract the contents of the .zip file. (Download Link: https://moonito.net/moonito-php-lib.1.0.1.zip)
- Upload the lib directory and its contents.
- Modify the configuration in lib/config.php according to your preferences.
Code:
// Put your API Public Key here
$apiPublicKey = 'Your API Public Key';
// Put your API Secret Key here
$apiSecretKey = 'Your API Secret Key';
// Protection option
// If set to 'true,' it turns on the protection
// If set to 'false,' it turns off the protection
$isProtected = true;
// Unwanted visitors redirection
// Leave it blank for default error response
$unwantedVisitorRedirect = 'https://example.com';
- Open the PHP file you want to secure, after < ?php at the top of the file, include the following code.
Code:
include_once("lib/detector.php");
- To configure the connection for various Content Management Systems (CMS), follow the specified paths relative to the root directory of the site:
- Drupal in index.php
- Joomla in index.php
- WordPress in wp-config.php
- OpenCart in index.php
- PunBB in index.php
- FluxBB in index.php
- MyBB in inc/config.php
- Drupal in index.php
- To configure the connection for various PHP Framework, follow the specified paths relative to the root directory of the site:
- Laravel in public/index.php
- CodeIgniter in index.php
- CakePHP in config/config.php
- Laravel in public/index.php
- For information regarding visitor statistics, you can go to Moonito's Analytics page for details.
What does Moonito do? - divides visitors into 3 groups:
Search engine bots - bots of search engines, social networks, etc. You can also block this if you want.
Genuine visitors - The real visitors that visit your website.
Unwanted visitors - unnecessary bots, spambots, vulnerability checkers, parsers - do not reach the site.
Who needs Moonito's antibot magic?
1) For Medium to Large Sites and Heavy CMS Users (e.g., WordPress): Reduces server load, saving processor resources, RAM, traffic, and internet bandwidth.
2) To Combat Spam: Shields against spam in contact forms, posts, registrations on forums, and comments on blogs. Also prevents bots from generating spam orders in online stores.
3) Protection from Cyber Threats: Defends against vulnerability searches, XSS attacks, and brute force attempts on admin areas.
4) Content Security: Guards against content theft by parsers that create non-unique content on other websites. Blocks email address collection by automated tools.
5) Defense Against Analyzers: Protects from content analyzers like AhrefsBot, Majestic, SEMrushBot, and similar tools. Safeguards against price analyzers, SEO analyzers of competitors, RKN bots, and antiviruses.
6) Counter Advertising Fraud: Filters out bots that inflate impressions and clicks on ads, preventing skewed statistics on counters.
But, why do I love to use Moonito service to protect my website?
1) Moonito not only protects my website but also has good analytics features like Google Analytics.
2) Have advanced features to filter visitors like Device Whitelisting, Allowing Specific Countries, Blocking VPN/Proxy/Tor, Blocking Bad IPs, Block Non-ISP IPs, Block Satellite ISPs, Block Spiders/Crawlers, Block Bad Referrer, DNS Based Blocking, Block Bot IPs, Block Bot Hostnames, Request Header Analysis, Search Engine Control, Web Application Firewall, Security Level Control, AI-Powered, Behavior Analysis, and much more.
3) More cheaper than other similar services like BlockScripts, TrafficArmor, and Imperva.
4) There are often lots of discount offers every month.
There is a trial period for testing: 7 days after registration.
Details on the website https://moonito.net
If you have any questions, ask in this thread or just send me messages.