针对多个快捷请求的.htaccess或PHP保护code [英] .htaccess or PHP protection code against multiple speedy requests
问题描述
我要寻找的想法如何,我可以停止与我的站点连接外部脚本。我在寻找同类落后于谷歌的想法。如,如果一定量的请求都按一定的时间作出则块的IP地址或东西。我觉得有可能是htaccess的解决方案,如果没有,我会写一个PHP的。
I am looking for ideas for how I can stop external scripts connecting with my site. I'm looking for the same kind of idea behind Google. As in if a certain amount of requests are made per a certain amount of time then block the IP address or something. I thought there maybe a htaccess solution if not, I will write a PHP one.
任何想法或链接到现有的方法或脚本是非常AP preciated。
Any ideas or links to existing methods or scripts is much appreciated.
推荐答案
PHPIDS 可能是你想。 目前PHPIDS检测各种XSS,SQL注入,头注入,目录遍历,RFE / LFI,DoS和LDAP的攻击。
PHPIDS might be what you want. "Currently the PHPIDS detects all sorts of XSS, SQL Injection, header injection, directory traversal, RFE/LFI, DoS and LDAP attacks."
从常见问题:
require_once 'IDS/Init.php';
$request = array(
'REQUEST' => $_REQUEST,
'GET' => $_GET,
'POST' => $_POST,
'COOKIE' => $_COOKIE
);
$init = IDS_Init::init('IDS/Config/Config.ini');
$ids = new IDS_Monitor($request, $init);
$result = $ids->run();
if (!$result->isEmpty()) {
// Take a look at the result object
echo $result;
}
这篇关于针对多个快捷请求的.htaccess或PHP保护code的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!