/*
* 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;
}
}
}
}
}
Convivea - Home of Bit Che
Home |
Download
|
Donate
|
Forums
|
Contact |
|
Latest News: Bit Che 3.5 build 50 has been released for public use! Download Now! |
Products |
Bit Che
Download
MP3 Checker
Download
|
|
Home
Welcome, Guest. Please login or register. Did you miss your activation email?
Convivea News: |
|
Be apart of our community by joining our online forums. Registration is FREE! Members will receive access to beta versions and can also help directly with the development of the software projects. Register today!
NEW: Bit Che 3.5 build 50 has been released for public use! Download Now! |
|
Please welcome nancychandler340, our newest member.
Forum Recent Topics:
Featured Product:
About Bit Che Screen Shot
|
Bit Che is an engine and script language for searching other websites.
- Super quick searching
- Able to preview file details
- Open source script files are customizable
More Information Download
|
|
|
thank you for donating!
Current Projects:
|
|
|
|
|