本文整理匯總了PHP中squidbee::url_rewrite_children方法的典型用法代碼示例。如果您正苦於以下問題:PHP squidbee::url_rewrite_children方法的具體用法?PHP squidbee::url_rewrite_children怎麽用?PHP squidbee::url_rewrite_children使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類squidbee
的用法示例。
在下文中一共展示了squidbee::url_rewrite_children方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: ufdbguard27
function ufdbguard27()
{
$unix = new unix();
$sock = new sockets();
$squid = new squidbee();
$users = new usersMenus();
$major = $unix->UFDBGUARDD_MAJOR();
$minor = $unix->UFDBGUARDD_MINOR();
$datas = unserialize(base64_decode($sock->GET_INFO("ufdbguardConfig")));
$ufdbClass = new compile_ufdbguard();
$datas = $ufdbClass->SetDefaultsConfig($datas);
if (!isset($datas["url_rewrite_children_concurrency"])) {
$datas["url_rewrite_children_concurrency"] = 2;
}
if (!isset($datas["url_rewrite_children_startup"])) {
$datas["url_rewrite_children_startup"] = 5;
}
if (!isset($datas["url_rewrite_children_idle"])) {
$datas["url_rewrite_children_idle"] = 5;
}
if (!is_numeric($datas["url_rewrite_children_concurrency"])) {
$datas["url_rewrite_children_concurrency"] = 2;
}
if ($datas["url_rewrite_children_concurrency"] > 1) {
$moinsC = "-C ";
}
if ($squid->EnableRemoteStatisticsAppliance == 1) {
$RemoteStatisticsApplianceSettings = unserialize(base64_decode($sock->GET_INFO("RemoteStatisticsApplianceSettings")));
if ($this->ASROOT) {
echo "Starting......: " . date("H:i:s") . " [UFDB]: Using remote appliance {$RemoteStatisticsApplianceSettings["SERVER"]}:{$datas["listen_port"]} as Web filtering engine\n";
}
$datas["remote_server"] = $RemoteStatisticsApplianceSettings["SERVER"];
$datas["UseRemoteUfdbguardService"] = 1;
$datas["remote_port"] = $datas["listen_port"];
}
$binary = "/usr/share/artica-postfix/ufdbgclient.php";
$log = "-l /var/log/squid";
if (!is_numeric($datas["listen_port"])) {
$datas["listen_port"] = "3977";
}
if (!is_numeric($datas["tcpsockets"])) {
$datas["tcpsockets"] = 1;
}
if (!is_numeric($datas["remote_port"])) {
$datas["remote_port"] = 3977;
}
if ($datas["remote_port"] == null) {
$datas["UseRemoteUfdbguardService"] = 0;
}
if ($datas["listen_addr"] == null) {
$datas["listen_addr"] = "127.0.0.1";
}
if ($datas["listen_addr"] == "all") {
$datas["listen_addr"] = "127.0.0.1";
}
if ($datas["UseRemoteUfdbguardService"] == 1) {
if (trim($datas["remote_server"] == null)) {
$datas["remote_server"] = "127.0.0.1";
}
$address = "-S {$datas["remote_server"]} -p {$datas["remote_port"]} ";
echo "Starting......: " . date("H:i:s") . " ufdbguardd: Use remote ufdbguard service: {$datas["remote_server"]}:{$datas["remote_port"]}\n";
$GLOBALS[__FUNCTION__] = "{$binary} {$moinsC}{$address} {$log}";
return "{$binary} {$moinsC}{$address} {$log}";
}
$effective_port = $squid->ufdbguard_value("port");
echo "Starting......: " . date("H:i:s") . " ufdbguardd: Effective port:`{$effective_port}`\n";
if (is_numeric($effective_port)) {
$datas["tcpsockets"] = 1;
}
if ($major > 0) {
if ($minor > 26) {
if ($datas["tcpsockets"] == 1) {
if (trim($datas["listen_addr"] == null)) {
$datas["listen_addr"] = "127.0.0.1";
}
echo "Starting......: " . date("H:i:s") . " ufdbguardd: Use remote ufdbguard service: {$datas["listen_addr"]}:{$datas["remote_port"]}\n";
$address = "-S {$datas["listen_addr"]} -p {$datas["listen_port"]} ";
$GLOBALS[__FUNCTION__] = "{$binary} {$moinsC}{$address} {$log}";
$f[] = "url_rewrite_program {$binary} {$moinsC}{$address} {$log}";
$f[] = $squid->url_rewrite_children();
return @implode("\n", $f);
}
}
}
echo "Starting......: " . date("H:i:s") . " ufdbguardd: Use remote ufdbguard service: {$binary} {$moinsC}{$log}\n";
$GLOBALS[__FUNCTION__] = "{$binary} {$moinsC}{$log}";
$f[] = "url_rewrite_program /usr/share/artica-postfix/ufdbgclient.php";
$f[] = $squid->url_rewrite_children();
return @implode("\n", $f);
}