i am trying to convert symbols into regexp *00 would be .5 in an ip address so
127.0.0.*00 would become 127.0.0.1-5 banning range. not sure if this is feasible i have a substr($buffer, 0, 1)=="r" in a buffer that finds a range and carries out range bans for the user ip if he falls into the range he is banned.
then i pass it on to a bunch of these
finnaly to
this might work but it might be a bit screwy i havent tested it yet... nor did i pay attention to regexps.. i may want to implement a better way to manage this processes so that i dont overkill banning
127.0.0.*00 would become 127.0.0.1-5 banning range. not sure if this is feasible i have a substr($buffer, 0, 1)=="r" in a buffer that finds a range and carries out range bans for the user ip if he falls into the range he is banned.
Code:
if (stristr($bufferf,"*00")) {
$p=explode(".", $bufferf);
$p=implode(".\\",$p);
$bufferf = str_ireplace("*00", "([0-9]$|[0-9]{2}$|5$)", $p);
}
finnaly to
Code:
$ipr is ip global
if (eregi("$bufferf",$ipr)) {//searches regular expression to match ip.
$rangebanned=true;
}
//banned lalala
header("location: $bannedredirect");