new functions

This commit is contained in:
Arionum
2018-04-26 02:45:09 +03:00
parent 66dee6516a
commit 3898b7c7e0
6 changed files with 34 additions and 10 deletions

View File

@@ -7,6 +7,17 @@ function san($a,$b=""){
return $a;
}
function san_ip($a){
$a = preg_replace("/[^a-fA-F0-9\[\]\.\:]/", "", $a);
return $a;
}
function san_host($a){
$a = preg_replace("/[^a-zA-Z0-9\.\-\:\/]/", "", $a);
return $a;
}
// api error and exit
function api_err($data){
global $_config;