/*
* Patch for filter_var()
*/
if(!function_exists('filter_var')){
define('FILTER_VALIDATE_IP', 'ip');
define('FILTER_FLAG_IPV4', 'ipv4');
define('FILTER_FLAG_IPV6', 'ipv6');
define('FILTER_VALIDATE_EMAIL', 'email');
define('FILTER_FLAG_EMAIL_UNICODE', 'unicode');
function filter_var($variable, $filter, $option = false){
if($filter == 'ip'){
if($option == 'ipv4'){
if(preg_match("/(\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})/", $variable, $matches)){
$variable = $matches[1];
return $variable;
}
}
if($option == 'ipv6'){
if(preg_match("/\s*(([:.]{0,7}[0-9a-fA-F]{0,4}){1,8})\s*/", $variable, $matches)){
$variable = $matches[1];
return $variable;
}
}
}
if($filter == 'email'){
if($option == 'unicode' || $option == false){
if(preg_match("/\s*(\S*@\S*\.\S*)\s*/", $variable, $matches)){
$variable = $matches[1];
return $variable;
}
}
}
}
}
Poradniki
Poradniki
- Gotowe, aktualne i pisane pod starsze wydania gry, poradniki dotyczące Lineage'a 2
|
|
|
2 Odpowiedzi
3786 Wyświetleń
|
Wrzesień 06, 2018, 05:23:28 pm
wysłana przez alandril
|
|
|
|
0 Odpowiedzi
3071 Wyświetleń
|
Grudzień 23, 2018, 08:48:52 pm
wysłana przez Endzi
|
|
|
|
0 Odpowiedzi
3675 Wyświetleń
|
Styczeń 12, 2019, 08:27:29 pm
wysłana przez zaboroo
|
|
|
|
0 Odpowiedzi
3086 Wyświetleń
|
Kwiecień 17, 2020, 02:28:06 am
wysłana przez TOPSELLER
|