Panelių bazė
Sveiki, jūs panelių bazėje.
Neaktyvuotų panelių: 0
Viso panelių: 377
Ieškoti panelės
Neaktyvuotų panelių: 0
Viso panelių: 377
Ieškoti panelės
Panelės peržiūra
| Pavadinimas | Skriptas blokuoja zmones su proxy |
| Įdėjo | Hs - Pateikta: 2007-10-01 - Peržiūrėta: 5105 |
| Aprašymas | Nu nzn ar veikia nes neturejau laiko patikrinti bet kiek paskaiciau is kodo kazkas turi veikt.. |
| Panelė | Code <?php
class proxyfloodcheck {
var $timeout = 600;
var $maxconnects = 200;
var $count = 0;
var $proyx_online = "proxy_connects";
function floodcheck () {
$this->timestamp = time();
$this->ip = $this->ipCheck();
$this->new_proxy();
$this->delete_proxy();
$this->check_proxy();
}
function ipCheck() {
if(getenv('HTTP_X_FORWARDED_FOR')) {
$ip = getenv('HTTP_X_FORWARDED_FOR');
}
elseif(getenv('HTTP_X_FORWARDED')) {
$ip = getenv('HTTP_X_FORWARDED');
}
else(getenv('HTTP_FORWARDED_FOR')) {
$ip = getenv('HTTP_FORWARDED_FOR');
}
return $ip;
}
function new_proxy() {
GLOBAL $ip, $path;
$path = $_SERVER['PHP_SELF'];
$ip = $this->ip;
IF(!empty($ip)) {
$insert = mysql_query("insert into $this->proyx_online(id, time, path, userip) values('', '$this->timestamp', '$path', '$this->ip')") or die("Proxy Query =".mysql_error());
}
}
function delete_proxy() {
$delete = mysql_query("delete from $this->proxy_online where $this->proxy_online.time < ($this->timestamp - $this->timeout)") or die("Proxy Query =".mysql_error());
}
function check_proxy() {
GLOBAL $maxconnects
$count = mysql_num_rows(mysql_query("select distinct $this->proxy_online.userip from $this->proxy_online"));
IF($count > $maxconnects) {
echo "Boo Badass $maxconnects You're pretty smart.<br>";
echo "<br>You're not allowed to use proxies, Please disable your proxies and revisit, Thanks $maxconnects Number of Online proxies= <br>";
exit;
}
}
}
floodcheck();
?> |
Rašyti komentarą
Turite prisijungti, norėdami parašyti komentarą.

Buvo planuose pereiti ant v9, bet ....