Source
'Mozilla/5.0 (Mozilla/5.0 (iPhone; CPU iPhone OS 12_2 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.0 Mobile/15E148 Safari/604.1' => 'Safari 13 (iPhone)',
<?php
/*
** Copyright (C) 2001-2025 Zabbix SIA
**
** This program is free software: you can redistribute it and/or modify it under the terms of
** the GNU Affero General Public License as published by the Free Software Foundation, version 3.
**
** This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
** without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
** See the GNU Affero General Public License for more details.
**
** You should have received a copy of the GNU Affero General Public License along with this program.
** If not, see <https://www.gnu.org/licenses/>.
**/
require_once dirname(__FILE__).'/defines.inc.php';
require_once dirname(__FILE__).'/items.inc.php';
function httptest_authentications($type = null) {
$authentication_types = [
ZBX_HTTP_AUTH_NONE => _('None'),
ZBX_HTTP_AUTH_BASIC => _('Basic'),
ZBX_HTTP_AUTH_NTLM => _('NTLM'),
ZBX_HTTP_AUTH_KERBEROS => _('Kerberos'),
ZBX_HTTP_AUTH_DIGEST => _('Digest')
];
if (is_null($type)) {
return $authentication_types;
}
elseif (isset($authentication_types[$type])) {
return $authentication_types[$type];
}
else {
return _('Unknown');
}
}
function httptest_status2str($status = null) {
$statuses = [
HTTPTEST_STATUS_ACTIVE => _('Enabled'),
HTTPTEST_STATUS_DISABLED => _('Disabled')
];
if (is_null($status)) {
return $statuses;
}
elseif (isset($statuses[$status])) {
return $statuses[$status];
}
else {
return _('Unknown');
}
}
function httptest_status2style($status) {
$statuses = [
HTTPTEST_STATUS_ACTIVE => ZBX_STYLE_GREEN,
HTTPTEST_STATUS_DISABLED => ZBX_STYLE_RED
];
if (isset($statuses[$status])) {