本文整理汇总了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);
}