Tuesday 3 March 2015

WordPress Comment Spam: How Simple PHP Tweaking Can Mean a World of Good!


It takes patience and perseverance to stick to blogging, which is a rigorous practice and there isn’t any guarantee of success. Many bloggers would agree that they have to push themselves – every time they want to write something, because, there has been such a stiff competition that it is one in a million chance that your blog would get noticed or someone would comment on your post. But, that has not deterred the bloggers from posting content on a regular basis and everyday millions of new pages have been added to the blogs worldwide.
Well, that could be the case with those who are trying to carve a niche in the world of blogging, but what about those who are already popular? Before you get on further, let your mind bear the mind to look for an expert in PHP application development. Why? Because if you are an avid blogger, and top of that popular, you would soon need the help of some who is known for the PHP app development service.
Mind the fact that WordPress is built on PHP, and any amount of tweaking, about which we will detail further down, will need an expert in PHP.
The Peril of Being Popular with a WordPress blog
One of the most common problems that every popular (and even mediocre) bloggers face these days is spamming! In fact, some hugely popular blogs get more than a thousand spam comments every day! Situation does look critical in that context, but if there is such a huge problem then there must be a solution. Here, if you have a PHP expert to reach at, grab his hand now, at this point!
If your blog is on WordPress then there are ways to take care of spamming. Usually what happens when people get loads of spam comments on WordPress is that they refer to different plugins - and that may include opting for Akismet! But that does slow your site down, by adding over 100KB of Java Script. For refined and long-lasting solutions, dedicated writers or bloggers must avail the services of PHP application development companies in India or from your nativity, anywhere around the globe.
How to go about handling comment spamming
There are some potent solutions. First of all, remove all of the anti-spam plugins because sometimes, they clash with each other. You can opt for generic anti-spam solutions by adding an INPUT to the form – with a captcha code. Once done with that you need to keep this form empty during the submission process. It means that this form would be empty in value but could be filled via key. It is not easy to add inputs on the server side. The best way to do it is by adding these input fields with JavaScript or by using a framework. But, before going for that you need to put in the server-side Spam blocker in place. When it comes to the WordPress PHP, you need to put in a check for the dynamic key presence. This means that users without passing a JavaScript funnel will not be able to post (read, spam) comments. This is one of the reasons why there has been a consistent demand for Java developers, as well as experts offering PHP apps development services from India especially (given their cost competiveness, primarily).
Actually, the best solution is to use basic JavaScript in the form filled. It will be effective because every Java Framework comes with its own Syntax. In combination with Ajax, a JS code with a hidden input command may look like:
var form = $('comment-form');
new Request({
url: form.action,
method: 'post',
onRequest: function() {},
onSuccess: function(content) {},
onComplete: function() {}
}).send(form.toQueryString() + '&is_legit=1');
There are efficient tools means like Disqus and MooTools, but nothing can be better with an efficiently coded own formula.
Now, once done with these basics, hope you would rest in peace and blog - without getting troubled by the spam comments.

No comments:

Post a Comment