php8.5
Home/ Manual/ radius / functions/ radius_put_string

radius_put_string

PHP function Edit on GitHub ✎

(PECL radius >= 1.1.0)

Attaches a string attribute

Description

radius_put_string(resource $radius_handle, int $type, string $value, int $options = 0, [int $tag]): bool

Attaches a string attribute to the current RADIUS request. In general, radius_put_attr() is a more useful function for attaching string attributes, as it is binary safe.

Required

Parameters

value

The attribute value. This value is expected by the underlying library to be null terminated, therefore this parameter is not binary safe.

Return Values

Success

Changelog

VersionDescription
PECL radius 1.3.0The options and tag parameters were added.

Examples

radius_put_string() example

php
<?php
if (!radius_put_string($res, RADIUS_USER_NAME, 'billy')) {
    echo 'RadiusError:' . radius_strerror($res). "\n<br />";
    exit;
}
?>

See Also

Source: reference/radius/functions/radius-put-string.xml · from the official PHP manual (php/doc-en)