Пример #1
0
function UfdbBlackList($ToUfdb, $PARAMS, $ToUfdbKey)
{
    $results = trim(ask_to_ufdb($ToUfdb, $PARAMS, $ToUfdbKey));
    if (preg_match("#SquidGuardIPWeb=(.+?)&#", $results, $re)) {
        $GLOBALS["SquidGuardIPWeb"] = base64_decode($re[1]);
    }
    $length = strlen(trim($results));
    if ($length < 5) {
        return false;
    }
    $CONNECT = false;
    $PROTO = $PARAMS["PROTO"];
    if ($PROTO == "CONNECT") {
        $CONNECT = true;
    }
    if ($GLOBALS["DEBUG_WEBFILTERING"]) {
        events("UfdbBlackList:[{$GLOBALS["UFDB_SERVER"]}] {$results}");
    }
    Output_results($results, __FUNCTION__, __LINE__, $CONNECT);
    return true;
}
Пример #2
0
function UfdbBlackList($ToUfdb){
	
	$results=trim(ask_to_ufdb($ToUfdb));
	if(preg_match("#SquidGuardIPWeb=(.+?)&#", $results,$re)){$GLOBALS["SquidGuardIPWeb"]=base64_decode($re[1]);}
	
	$length=strlen(trim($results));
	if($GLOBALS["VERBOSE"]){ events("ask_to_ufdb return $length bytes");}
	if($length<5){return false;}

	Output_results($results);
	return true;
}