How to prevent USER from using automatic messages / spam?
Here is my way to do this, a new php session for every page request that has its limitations, there is no multitasking.
I used a new session for each page as protection against CSRF and automatic attacks. Let's say we have a forum that uses AJAX to publish threads and test it using PHP SESSION.
add_answer.php? ID = 123
<?php
if(!is_ajax()){
$_SESSION['token'] = md5(rand());
}
?>
ajax.php? ID = 123
<?php
if($_SESSION['token'] == $_GET['token']){
echo 'MYSQL INSERT stuff';
}else{
echo 'Invalid Request';
}
?>
, page.php? id = 456 , ajax " " ajax.php? id = 123 , . , / - . - , . ?
, AJAX?
PS:
- captchas.
- Google - .
- .
- , , , , , .