radius_get_tagged_attr_tag

(PECL radius >= 1.3.0)

radius_get_tagged_attr_tagExtrait le tag depuis un attribut

Description

integer radius_get_tagged_attr_tag ( string $data )

Si un attribut contenant un tag a été retourné depuis la fonction radius_get_attr(), radius_get_tagged_attr_data() va retourner le tag depuis l'attribut.

Liste de paramètres

data

L'attribut à décoder.

Valeurs de retour

Retourne le tag depuis l'attribut ou FALSE si une erreur survient.

Exemples

Exemple #1 Exemple avec radius_get_tagged_attr_tag()

<?php
while ($resa = radius_get_attr($res)) {
	if (!is_array($resa)) {
		printf ("Erreur lors de la récupération de l'attribut : %s\n",  radius_strerror($res));
		exit;
	}

	$attr = $resa['attr'];
	$data = $resa['data'];

	$tag = radius_get_tagged_attr_tag($data);
	$value = radius_get_tagged_attr_data($data);

	printf("Récupération de l'attribut contennant le tag %d et la valeur %s\n", $tag, $value);
}
?>

Voir aussi

LoadingChargement en cours