/* * 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; } } } } }
Subject / Started by ![]() |
Replies / Views | Last post | ||
---|---|---|---|---|
0 Members and 42 Guests are viewing this board. | ||||
![]() |
![]() |
293 Replies
139420 Views |
![]() by gallagolito |
|
![]() |
![]() |
27 Replies
30258 Views |
![]() by MilanoManoloManuel |
|
![]() |
![]() |
Calcular F para el TLS APO Swavrovski
Started by fasciatus |
11 Replies
11061 Views |
![]() by fasciatus |
![]() |
![]() |
70 Replies
66606 Views |
![]() by vicen |
|
![]() |
![]() |
0 Replies
3501 Views |
![]() by fasciatus |
|
![]() |
![]() |
19 Replies
20106 Views |
![]() by fasciatus |
|
![]() |
![]() |
1 Replies
4498 Views |
![]() by marcas |
|
![]() |
![]() |
20 Replies
15169 Views |
![]() by fasciatus |
|
![]() |
![]() |
24 Replies
45076 Views |
![]() by Ricardo Pérez |
|
![]() |
![]() |
Comparativa de ópticas
Started by 3RIOS |
2 Replies
1626 Views |
![]() by OVERKILL |
![]() |
![]() |
telescopios y varios
Started by 3RIOS |
11 Replies
4351 Views |
![]() by 3RIOS |
![]() |
![]() |
dudas sobre telescopios
Started by 3RIOS |
11 Replies
4974 Views |
![]() by 3RIOS |
![]() |
![]() |
42 Replies
12900 Views |
![]() by A. Íñigo |
|
![]() |
![]() |
Rotura-ocular-peso cámara
Started by Abarca |
11 Replies
2525 Views |
![]() by Abarca |
![]() |
![]() |
TSN 884 + TSN VA3 + VIDEOCAMARA
Started by abg |
2 Replies
1665 Views |
![]() by abg |
![]() |
![]() |
Mantenimiento telescopios terrestres
Started by Abrantino |
2 Replies
1021 Views |
![]() by Cosme |
![]() |
![]() |
os encontre
Started by accipiter |
5 Replies
3144 Views |
![]() by KchoPrro |
![]() |
![]() |
No tengo palabras .
Started by Adalberti |
6 Replies
2549 Views |
![]() by Ricardo Pérez |
![]() |
![]() |
1 Replies
1574 Views |
![]() by fasciatus |
|
![]() |
![]() |
Mes y medio
Started by Adalberti |
5 Replies
2573 Views |
![]() by FALCONETTI |
![]() |
![]() |
Una ayudita
Started by Adalberti |
5 Replies
4365 Views |
![]() by Gallows Pole |
![]() |
![]() |
Pentax o celestron
Started by Addigiscoping |
4 Replies
1382 Views |
![]() by fasciatus |
![]() |
![]() |
Compra de Telescopio Celestron
Started by Addigiscoping |
2 Replies
1550 Views |
![]() by fasciatus |
![]() |
![]() |
1 Replies
1412 Views |
![]() by CRueda |
|
![]() |
![]() |
Primeras pruebas
Started by AGarrido |
11 Replies
5301 Views |
![]() by AGarrido |
Normal Topic
Hot Topic (More than 15 replies)
Very Hot Topic (More than 25 replies)
Locked Topic
Sticky Topic
Poll