Вычистка огрызков getIP() и перенос функции mail() в класс.

This commit is contained in:
2022-12-19 23:15:56 +02:00
parent 2f6517f5b3
commit a0efddefc5
14 changed files with 3388 additions and 2430 deletions
+3 -8
View File
@@ -141,14 +141,9 @@ if (isset($_GET['test'])) {
die();
}
function getIP()
{
return isset($_SERVER['HTTP_X_REAL_IP']) ? $_SERVER['HTTP_X_REAL_IP'] : $_SERVER['REMOTE_ADDR'];
}
if (!isset($_GET['robot']) && getIP() != $_SERVER['SERVER_ADDR'] && getIP() != '127.0.0.1' && getIP() != '' && getIP(
) != '31.131.116.166' && !isset($_GET['test'])) {
die(getIP() . '<br>' . $_SERVER['SERVER_ADDR']);
if (!isset($_GET['robot']) && UserIp::get() != $_SERVER['SERVER_ADDR'] && UserIp::get() != '127.0.0.1' && UserIp::get(
) != '' && UserIp::get() != '31.131.116.166') {
die(UserIp::get() . '<br>' . $_SERVER['SERVER_ADDR']);
}