PHP.nl

radius_put_attr

radius_put_attr

Attaches a binary attribute

bool **radius_put_attr** resource $radius_handle int $type string $value int $options int $tag

Attaches a binary attribute to the current RADIUS request.

valueThe attribute value, which will be treated as a raw binary string.

return.success

Voorbeeld: example

<?php
mt_srand(time());
$chall = mt_rand();
$chapval = hash('md5', pack('Ca*',1 , 'sepp' . $chall));
$pass = pack('CH*', 1, $chapval);
if (!radius_put_attr($res, RADIUS_CHAP_PASSWORD, $pass)) {
    echo 'RadiusError:' . radius_strerror($res). "\n<br />";
    exit;
}
?>

radius_get_attr``radius_get_vendor_attr``radius_put_vendor_attr