Ever Wanted to Ban Spammy User From Your Blogger Blog,Well Dealing With Spammers Is a Quite Jerky Task.There’s almost no way to completely avoid them, but that doesn’t mean that you have to put up with them and let them keep on Spamming Your Site and Disturbing Peace on Your Blog.
However There are Some Other Ways to Minimize them,Here is a Simple Tutorial On How to Reduce them Using this Simple PHP Coding..
However There are Some Other Ways to Minimize them,Here is a Simple Tutorial On How to Reduce them Using this Simple PHP Coding..
<?php
/*
Blogspot IP address blocker.
*/
$iplist = array(“IP Address 1″,”IP Address 2″,”IP Address 3″); // the list of banned IPs
$ip = getenv(“REMOTE_ADDR”); // get the visitors IP address
// echo “$ip”;
$found = false;
foreach ($iplist as $value) { // scan the list
if (strpos($ip, $value) === 0){
$found = true;
}
}
if ($found == true) {
echo “top.location = “error.html”;n”; // page to divert to
}
?>
OK Now Upload your newly created PHP file on any PHP supported web hosting service like 000webhost.com Lastly, paste the following code in your Blogger or Blogspot blog
<SCRIPT LANGUAGE=’javascript’ SRC=’BlogspotIPblocker.php’ TYPE=’text/javascript’></SCRIPT>
There are 2 methods by which you can do this:
METHOD 1:
- Go to the ‘Design’ < Edit Html
- Search for the </head> tag and paste the code before it.
METHOD 2:
- Go to the ‘Design’ < Page Elements < Add a Gadget.
- Now select ‘HTML/JavaScript’ and paste the code inside the ‘Content’ box
- Now Save the gadget
That’s it! Next time the user spammer tries to visit your page, they won’t be able to access it and will receive a custom message.
It's very nice of you to share your knowledge through posts. I love to read stories about your experiences. They're very useful and interesting. I am excited to read the next posts. I'm so grateful for all that you've done. Keep plugging. Many viewers like me fancy your writing. Thank you for sharing precious information with us. Best business voip phone service service provider
ReplyDeleteDo you have the ability to benefit from these advantages? If not, switching to a phone with an eSIM might not be justified. Due to its advantages, accessing any cellular network may be made much more accessible, allowing for a better and hassle-free wireless experience. No Steering SIM Card
ReplyDelete