Backend block for sure
正常人要 Spam 你唔會用 UI, 直接開機 Curl 你已經得
via HKEPC Ionic ...
hihihi123hk 發表於 2017-4-2 08:13 PM 
暫時搵到兩個solutions:
應該走邊個approach好?兩個都係backend…
但session果個…其實CURL唔用cookies 就廢左…
----
Apache mod_bandwidth allows to control certain IPs
i.e. BandWidth <domain|ip|all> <rate>
----
<?php
$min_seconds_between_refreshes = 3;
session_start();
if(array_key_exists('last_access', $_SESSION) && time()-$min_seconds_between_refreshes <= $_SESSION['last_access']) {
// The user has been here at least $min_seconds_between_refreshes seconds ago - block them
exit('You are refreshing too quickly, please wait a few seconds and try again.');
}
// Record now as their last access time
$_SESSION['last_access'] = time();
?> |