# radius_create_request

(PECL radius >= 1.1.0)

radius_create_request — Create accounting or authentication request

### 说明

radius_create_request ( resource `$radius_handle` , int `$type` ) : bool

A Radius request consists of a code specifying the kind of request, and zero or more attributes which provide additional information. To begin constructing a new request, call radius_create_request().

> Note: Attention: You must call this function, before you can put any attribute!

### 参数

`radius_handle`

`type`

  Type is `RADIUS_ACCESS_REQUEST` or `RADIUS_ACCOUNTING_REQUEST`.

### 返回值

成功时返回 `TRUE`， 或者在失败时返回 `FALSE`。

### 范例

Example #1 radius_create_request() example

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

### 参见

- radius_send_request() - Sends the request and waits for a reply