函数名称:radius_request_authenticator()
适用版本:PHP 4, PHP 5, PHP 7
函数描述:radius_request_authenticator() 函数用于获取一个 RADIUS 请求的认证器(Authenticator),该认证器用于验证 RADIUS 服务器发送的回应。
用法:
string radius_request_authenticator(resource $radius_handle)
参数:
返回值:
示例:
// 创建一个 RADIUS 连接句柄
$radius_handle = radius_auth_open();
// 连接到 RADIUS 服务器
radius_add_server($radius_handle, 'radius.example.com', 1812, 'shared_secret', 5, 3);
// 发送一个 RADIUS 认证请求
if (radius_create_request($radius_handle, RADIUS_ACCESS_REQUEST)) {
// 获取请求的认证器
$authenticator = radius_request_authenticator($radius_handle);
if ($authenticator !== FALSE) {
echo "请求的认证器:$authenticator";
} else {
echo "获取认证器失败";
}
} else {
echo "创建请求失败";
}
// 关闭 RADIUS 连接句柄
radius_close($radius_handle);
注意事项: