Fight SPAM!
March 21, 2017, 8:15 amArticle Summary
Eldar Gerfanov (Admin)
March 21, 2017, 8:15 am
March 21, 2017, 3:09 pm
3672
Public
Author Summary
Wed April 2, 2025, 11:56 am
Wed April 2, 2025, 11:56 am
This website has recently become a target of relentless spam attacks.
Some dumbasses (probably bots or worse Russian hackers) post unrelated messages and such. Possibly looking for exploits in the security system.
I pride my self in openness to any meaningful content and do not want to pre-moderate comments or make registration (with email verification) mandatory.
So I subscribed to https://www.abuseipdb.com free API service that checks user's IP address before allowing to post any comments.
If you by any chance are wrongfully denied access, just let me know and i will clear the block.
On my part i will ban and report spammers with extreme prejudice. Let's make internet spam free one IP at a time!
For webmasters here is plain PHP code i used to enable IP checking and reporting:
<?php function httpCheckAbuse($ip){ $key="[secret API key]"; $url = "https://www.abuseipdb.com/check/".$ip."/json"; $ret=httpRequest($url,'GET',['key'=>$key,'days'=>60],$status); if ($status==200) return json_decode($ret); else return false; } function httpReportAbuse($ip,$comment){ $key="[secret API key]"; $url = "https://www.abuseipdb.com/report/json"; $ret=httpRequest($url,'GET', [ 'key'=>$key, 'category'=>10, 'comment'=>$comment, 'ip'=>$ip, ],$status); if ($status==200) return json_decode($ret); else return false; } function httpRequest($url,$method,$queryArray,&$status=null){ $request = curl_init(); // Set request options try{ switch ($method){ case 'POST': curl_setopt_array($request, array ( CURLOPT_URL => $url, CURLOPT_POST => true, CURLOPT_POSTFIELDS => http_build_query($queryArray), )); break; case 'GET': default: curl_setopt_array($request, array ( CURLOPT_URL => $url."?".http_build_query($queryArray), )); } curl_setopt($request,CURLOPT_RETURNTRANSFER , true); curl_setopt($request,CURLOPT_HEADER, false); // Execute request and get response and status code $response = curl_exec($request); $status = curl_getinfo($request, CURLINFO_HTTP_CODE); curl_close($request); if($status == 200) return $response; }catch (Exception $ex){ return null; } return null; }
Best Regards.