cvs: peardoc /ja/package/authentication auth-radius.xml /ja/package/authentication/auth-radius intro.xml /ja/pecl satellite.xml spplus.xml

From: Date: Fri, 05 Jan 2007 12:23:57 +0000
Subject: cvs: peardoc /ja/package/authentication auth-radius.xml /ja/package/authentication/auth-radius intro.xml /ja/pecl satellite.xml spplus.xml
Groups: php.pear.doc 
Request: Send a blank email to pear-doc+get-9217@lists.php.net to get a copy of this message
takagi Fri Jan 5 12:23:57 2007 UTC Added files: /peardoc/ja/pecl spplus.xml satellite.xml /peardoc/ja/package/authentication/auth-radius intro.xml /peardoc/ja/package/authentication auth-radius.xml Log: initial translation.

http://cvs.php.net/viewvc.cgi/peardoc/ja/pecl/spplus.xml?view=markup&rev=1.1 Index: peardoc/ja/pecl/spplus.xml +++ peardoc/ja/pecl/spplus.xml <?xml version="1.0" encoding="utf-8" ?> <!-- $Revision: 1.1 $ --> <!-- EN-Revision: 1.6 Maintainer: takagi Status: ready --> <!-- Author: Chaillan Nicolas <nicos@php.net> --> <reference id="pecl.spplus"> <title>SPPLUS 決済システム</title> <titleabbrev>SPPLUS</titleabbrev> <partintro> <sect1 id="pecl.spplus.partintro"> <title>導入</title> <sect2 id="pecl.spplus.intro"> <title>SPPLUS 決済システムについて</title> <para> このモジュールにより、Caisse d'Epargne (フランスの銀行) の SPPLUS 決済システムを使用できるようになります。 </para> <note> <para> spplus を使用するには、新しい kit_php が必要となります。 これが見つからない場合は、ご連絡ください。 </para> <para> このモジュールは、(現時点では) *nix 系のオペレーティングシステム上でしか動作しません。 </para> </note> </sect2> <sect2 id="pecl.spplus.install"> <title>インストール</title> <para> 手っ取り早いインストールメモ <itemizedlist> <listitem> <simpara> PHP 4.1.0 以降および SPPLUS v.3 が必要です。 </simpara> </listitem> <listitem> <simpara> コンソールで 'pear install spplus' と入力します。 </simpara> </listitem> </itemizedlist> </para> </sect2> <sect2 id="pecl.spplus.configuration"> <title>設定</title> <para> 設定の詳細については、kit_php のソース配布物に含まれる README ファイルを参照ください。 </para> </sect2> <sect2 id="pecl.spplus.contact"> <title>連絡先</title> <para> 近い将来、さらに機能を追加する予定です。 </para> <para> 何か言いたいことがある場合、 あるいはバグ修正や機能追加をしてくれたりなどで開発を手伝ってくださる場合は nicos あてにメールを送ってください。メールアドレスは <ulink url="mailto:nicos@php.net">nicos@php.net</ulink> です。 </para> </sect2> </sect1> </partintro> <refentry id="pecl.spplus.spplus-calcul_hmac"> <refnamediv> <refname>calcul_hmac</refname> <refpurpose>hmac を取得する (八つの引数が必要)</refpurpose> </refnamediv> <refsect1> <title>説明</title> <funcsynopsis> <funcprototype> <funcdef>string <function>calcul_hmac</function></funcdef> <paramdef>string <parameter>clent</parameter></paramdef> <paramdef>string <parameter>siretcode</parameter></paramdef> <paramdef>string <parameter>price</parameter></paramdef> <paramdef>string <parameter>reference</parameter></paramdef> <paramdef>string <parameter>validity</parameter></paramdef> <paramdef>string <parameter>taxation</parameter></paramdef> <paramdef>string <parameter>devise</parameter></paramdef> <paramdef>string <parameter>language</parameter></paramdef> </funcprototype> </funcsynopsis> <para> HMAC キーを生成します (引数は八つのみです)。 </para> </refsect1> </refentry> <refentry id="pecl.spplus.spplus-calculhmac"> <refnamediv> <refname>calculhmac</refname> <refpurpose>hmac キーを取得する (二つの引数が必要)</refpurpose> </refnamediv> <refsect1> <title>説明</title> <funcsynopsis> <funcprototype> <funcdef>string <function>calculhmac</function></funcdef> <paramdef>string <parameter>clent</parameter></paramdef> <paramdef>string <parameter>data</parameter></paramdef> </funcprototype> </funcsynopsis> <para> HMAC キーを生成します (引数は二つのみです)。 </para> </refsect1> </refentry> <refentry id="pecl.spplus.spplus-nthmac"> <refnamediv> <refname>nthmac</refname> <refpurpose>nthmac キーを取得する (二つの引数が必要)</refpurpose> </refnamediv> <refsect1> <title>説明</title> <funcsynopsis> <funcprototype> <funcdef>string <function>nthmac</function></funcdef> <paramdef>string <parameter>clent</parameter></paramdef> <paramdef>string <parameter>data</parameter></paramdef> </funcprototype> </funcsynopsis> <para> NTHMAC キーを生成します (引数は二つのみです)。 </para> </refsect1> </refentry> <refentry id="pecl.spplus.spplus-signeurlpaiement"> <refnamediv> <refname>signeurlpaiement</refname> <refpurpose>決済 url を取得する (二つの引数が必要)</refpurpose> </refnamediv> <refsect1> <title>説明</title> <funcsynopsis> <funcprototype> <funcdef>string <function>signeurlpaiement</function></funcdef> <paramdef>string <parameter>clent</parameter></paramdef> <paramdef>string <parameter>data</parameter></paramdef> </funcprototype> </funcsynopsis> <para> 決済 url を取得します (二つの引数が必要です)。 </para> </refsect1> </refentry> </reference> <!-- Keep this comment at the end of the file Local variables: mode: sgml sgml-omittag:t sgml-shorttag:t sgml-minimize-attributes:nil sgml-always-quote-attributes:t sgml-indent-step:1 sgml-indent-data:t sgml-parent-document:nil sgml-default-dtd-file:"../../manual.ced" sgml-exposed-tags:nil sgml-local-catalogs:nil sgml-local-ecat-files:nil End: vim600: syn=xml fen fdm=syntax fdl=2 si vim: et tw=78 syn=sgml vi: ts=1 sw=1 --> http://cvs.php.net/viewvc.cgi/peardoc/ja/pecl/satellite.xml?view=markup&rev=1.1 Index: peardoc/ja/pecl/satellite.xml +++ peardoc/ja/pecl/satellite.xml <?xml version="1.0" encoding="utf-8" ?> <!-- $Revision: 1.1 $ --> <!-- EN-Revision: 1.2 Maintainer: takagi Status: ready --> <!-- Author: David Eriksson <eriksson@php.net> --> <reference id="pecl.satellite"> <title>Satellite CORBA クライアント拡張</title> <titleabbrev>Satellite</titleabbrev> <partintro> &warn.experimental; <para> Satellite は非推奨です。Universe (<ulink url="&url.corba.universe;">&url.corba.universe;</ulink>) を使用し、Satellite は使用しないことを推奨します。 </para> <para> Satellite 拡張は、CORBA オブジェクトにアクセスするために使用されます。 php.ini の idl_directory= エントリに、使用する全ての IDL ファイルを保存する場所のパスを設定する必要があります。 </para> <para> Satellite のインストールについての詳細は、Satellite の README ファイルを参照ください。 </para> </partintro> <refentry id="pecl.satellite.orbitobject"> <refnamediv> <refname>OrbitObject</refname> <refpurpose>CORBA オブジェクトにアクセスする</refpurpose> </refnamediv> <refsect1> <title>説明</title> <funcsynopsis> <funcprototype> <funcdef>new <function>OrbitObject</function></funcdef> <paramdef>string <parameter>ior</parameter></paramdef> </funcprototype> </funcsynopsis> &warn.experimental.func; <para> このクラスは CORBA オブジェクトへのアクセス機能を提供します。 パラメータ <parameter>ior</parameter> には、 リモートオブジェクトを指す IOR(Interoperable Object Reference) を文字列で指定します。 </para> <para> <example> <title>IDL ファイルの例</title> <programlisting role="idl"> <![CDATA[ interface MyInterface { void SetInfo (string info); string GetInfo(); attribute int value; } ]]> </programlisting> </example> </para> <para> <example> <title>MyInterface にアクセスするための PHP コード</title> <programlisting role="php"> <![CDATA[ <?php $obj = new OrbitObject ($ior); $obj->SetInfo ("A 2GooD object"); echo $obj->GetInfo(); $obj->value = 42; echo $obj->value; ?> ]]> </programlisting> </example> </para> </refsect1> </refentry> <refentry id="pecl.satellite.orbitenum"> <refnamediv> <refname>OrbitEnum</refname> <refpurpose>CORBA enums を使用する</refpurpose> </refnamediv> <refsect1> <title>説明</title> <funcsynopsis> <funcprototype> <funcdef>new <function>OrbitEnum</function></funcdef> <paramdef>string <parameter>id</parameter></paramdef> </funcprototype> </funcsynopsis> &warn.experimental.func; <para> このクラスは、パラメータ <parameter>id</parameter> で指定した連番を表します。 パラメータ <parameter>id</parameter> は、 連番の名前(例: "MyEnum")あるいは 完全なレポジトリID(例:"IDL:MyEnum:1.0")のどちらかです。 </para> <para> <example> <title>IDL ファイルの例</title> <programlisting role="idl"> <![CDATA[ enum MyEnum { a,b,c,d,e }; ]]> </programlisting> </example> </para> <para> <example> <title>MyEnum にアクセスするための PHP コード</title> <programlisting role="php"> <![CDATA[ <?php $enum = new OrbitEnum ("MyEnum"); echo $enum->a; /* 0 を出力 */ echo $enum->c; /* 2 を出力 */ echo $enum->e; /* 4 を出力 */ ?> ]]> </programlisting> </example> </para> </refsect1> </refentry> <refentry id="pecl.satellite.orbitstruct"> <refnamediv> <refname>OrbitStruct</refname> <refpurpose>CORBA 構造体を使用する</refpurpose> </refnamediv> <refsect1> <title>説明</title> <funcsynopsis> <funcprototype> <funcdef>new <function>OrbitStruct</function></funcdef> <paramdef>string <parameter>id</parameter></paramdef> </funcprototype> </funcsynopsis> &warn.experimental.func; <para> このクラスは、パラメータ <parameter>id</parameter> で指定した構造体を表します。 パラメータ <parameter>id</parameter> は、 構造体の名前 (例: "MyStruct") または完全なレポジトリ ID (例: "IDL:MyStruct:1.0") のどちらかです。 </para> <para> <example> <title>IDL ファイルの例</title> <programlisting role="idl"> <![CDATA[ struct MyStruct { short shortvalue; string stringvalue; }; interface SomeInterface { void SetValues (MyStruct values); MyStruct GetValues(); } ]]> </programlisting> </example> </para> <para> <example> <title>MyStruct にアクセスする PHP コード</title> <programlisting role="php"> <![CDATA[ <?php $obj = new OrbitObject ($ior); $initial_values = new OrbitStruct ("IDL:MyStruct:1.0"); $initial_values->shortvalue = 42; $initial_values->stringvalue = "HGTTG"; $obj->SetValues ($initial_values); $values = $obj->GetValues(); echo $values->shortvalue; echo $values->stringvalue; ?> ]]> </programlisting> </example> </para> </refsect1> </refentry> <refentry id="pecl.satellite.satellite-caught-exception"> <refnamediv> <refname>satellite_caught_exception</refname> <refpurpose> 例外が前の関数からキャッチされたかどうかを調べる </refpurpose> </refnamediv> <refsect1> <title>説明</title> <funcsynopsis> <funcprototype> <funcdef>bool <function>satellite_caught_exception</function> </funcdef> <paramdef></paramdef> </funcprototype> </funcsynopsis> &warn.experimental.func; <para> この関数は、例外がキャッチされた場合に &true; を返します。 </para> <para> <example> <title>IDL ファイルの例</title> <programlisting role="idl"> <![CDATA[ /* ++?????++ Out of Cheese Error. Redo From Start. */ exception OutOfCheeseError { int parameter; } interface AnotherInterface { void AskWhy() raises (OutOfCheeseError); } ]]> </programlisting> </example> </para> <para> <example> <title>CORBA 例外を処理する PHP コード</title> <programlisting role="php"> <![CDATA[ <?php $obj = new OrbitObject ($ior); $obj->AskWhy(); if (satellite_caught_exception()) { if ("IDL:OutOfCheeseError:1.0" == satellite_exception_id()) { $exception = satellite_exception_value(); echo $exception->parameter; } } ?> ]]> </programlisting> </example> </para> </refsect1> </refentry> <refentry id="pecl.satellite.satellite-exception-id"> <refnamediv> <refname>satellite_exception_id</refname> <refpurpose>直近の例外に関するレポジトリ ID を取得する</refpurpose> </refnamediv> <refsect1> <title>説明</title> <funcsynopsis> <funcprototype> <funcdef>string <function>satellite_exception_id</function></funcdef> <paramdef></paramdef> </funcprototype> </funcsynopsis> &warn.experimental.func; <para> レポジトリID文字列を返します (例:"IDL:MyException:1.0")。 例としては、<function>satellite_caught_exception</function> の使用例を参照ください。 </para> </refsect1> </refentry> <refentry id="pecl.satellite.satellite-exception-value"> <refnamediv> <refname>satellite_exception_value</refname> <refpurpose> 直近の例外に関する例外構造体を得る </refpurpose> </refnamediv> <refsect1> <title>説明</title> <funcsynopsis> <funcprototype> <funcdef>OrbitStruct <function>satellite_exception_value</function> </funcdef> <paramdef></paramdef> </funcprototype> </funcsynopsis> &warn.experimental.func; <para> 例外構造体を返します。例については、 <function>satellite_caught_exception</function> の使用例を参照ください。 </para> </refsect1> </refentry> <refentry id='pecl.satellite.satellite-object-to-string'> <refnamediv> <refname>satellite_object_to_string</refname> <refpurpose> オブジェクトを文字列表現に変換する </refpurpose> </refnamediv> <refsect1> <title>説明</title> <funcsynopsis> <funcprototype> <funcdef>string <function>satellite_object_to_string</function></funcdef> <paramdef>object <parameter>obj</parameter></paramdef> </funcprototype> </funcsynopsis> <para> オブジェクトを、その文字列表現(IOR)に変換します。 </para> </refsect1> </refentry> <refentry id='pecl.satellite.satellite-load-idl'> <refnamediv> <refname>satellite_load_idl</refname> <refpurpose> タイプマネージャに IDL ファイルのロードを指示する </refpurpose> </refnamediv> <refsect1> <title>説明</title> <funcsynopsis> <funcprototype> <funcdef>bool <function>satellite_load_idl</function></funcdef> <paramdef>string <parameter>file</parameter></paramdef> </funcprototype> </funcsynopsis> <para> IDL ファイルを Satellite にロードします。 </para> </refsect1> </refentry> <refentry id='pecl.satellite.satellite-get-repository-id'> <refnamediv> <refname>satellite_get_repository_id</refname> <refpurpose> 未実装 </refpurpose> </refnamediv> <refsect1> <title>説明</title> <funcsynopsis> <funcprototype> <funcdef>int <function>satellite_get_repository_id</function></funcdef> <paramdef>object <parameter>obj</parameter></paramdef> </funcprototype> </funcsynopsis> <para> 実装されていません。 </para> </refsect1> </refentry> </reference> <!-- Keep this comment at the end of the file Local variables: mode: sgml sgml-omittag:t sgml-shorttag:t sgml-minimize-attributes:nil sgml-always-quote-attributes:t sgml-indent-step:1 sgml-indent-data:t indent-tabs-mode:nil sgml-parent-document:nil sgml-default-dtd-file:"../../manual.ced" sgml-exposed-tags:nil sgml-local-catalogs:nil sgml-local-ecat-files:nil End: vim600: syn=xml fen fdm=syntax fdl=2 si vim: et tw=78 syn=sgml vi: ts=1 sw=1 --> http://cvs.php.net/viewvc.cgi/peardoc/ja/package/authentication/auth-radius/intro.xml?view=markup&rev=1.1 Index: peardoc/ja/package/authentication/auth-radius/intro.xml +++ peardoc/ja/package/authentication/auth-radius/intro.xml <?xml version="1.0" encoding="utf-8" ?> <!-- $Revision: 1.1 $ --> <!-- EN-Revision: 1.1 Maintainer: takagi Status: ready --> <refentry id="packages.authentication.auth-radius.intro"> <refnamediv> <refname>導入</refname> <refpurpose> Auth_RADIUS の基本的な使用法 </refpurpose> </refnamediv> <refsect1> <title>Auth_RADIUS とは?</title> <para> Auth_RADIUS は、radius 拡張モジュールの php ラッパーです。 RADIUS プロトコルにあまりなじみがない場合は、 <ulink url="http://ja.wikipedia.org/wiki/RADIUS">Wikipedia の記事</ulink> を参照するとよいでしょう。 </para> <para> Auth_RADIUS は、radius 拡張モジュールに組み込まれた機能を使用するためのものです。 Auth_RADIUS について理解するには、まず radius 拡張モジュールの設計について理解しておく必要があるでしょう。 radius 拡張モジュールのドキュメントは、PHP マニュアルの <ulink url="&url.php.manual;ja/ref.radius.php">&url.php.manual;ja/ref.radius.php</ulink> にあります。 </para> <para> RADIUS で使用できるさまざまな認証方式に対応するクラス群が用意されています。 CHAP-MD5 あるいは MS-CHAP による認証を使用する場合は、 <ulink url="&url.pear.package;Crypt_CHAP">Crypt_CHAP</ulink> パッケージも必要となります。さらに、MS-CHAP 認証を使用する場合は、 mhash および mcrypt 拡張モジュールを php.ini で有効にするか、 あるいは静的に組み込んでおく必要があります。 </para> <para> 最新の radius 拡張モジュール (バージョン 1.2 以降) を使用する場合は、 mcrypt 拡張モジュールを有効にする必要がないことに注意しましょう。 </para> </refsect1> <refsect1 id="packages.authentication.auth-radius.intro.how"> <title>Auth_RADIUS の使用法は?</title> <para> 基本的な使用例を以下に示します。 これは、パッケージに付属するサンプルそのものです。 </para> <para> <programlisting role="php"> <![CDATA[ <?php /* vim: set expandtab tabstop=4 shiftwidth=4: */ /* Copyright (c) 2003, Michael Bretterklieber <michael@bretterklieber.com> All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 3. The names of the authors may not be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. This code cannot simply be copied and put under the GNU Public License or any other GPL-like (LGPL, GPL2) License. $Id: intro.xml,v 1.1 2007/01/05 12:23:57 takagi Exp $ */ require_once 'Auth/RADIUS.php'; require_once 'Crypt/CHAP.php'; //$type = 'PAP'; //$type = 'CHAP_MD5'; $type = 'MSCHAPv1'; //$type = 'MSCHAPv2'; $username = 'sepp'; $password = 'sepp'; $classname = 'Auth_RADIUS_' . $type; $rauth = new $classname($username, $password); $rauth->addServer('localhost', 0, 'testing123'); $rauth->setConfigfile('/etc/radius.conf'); $rauth->username = $username; switch($type) { case 'CHAP_MD5': case 'MSCHAPv1': $classname = $type == 'MSCHAPv1' ? 'Crypt_CHAP_MSv1' : 'Crypt_CHAP_MD5'; $crpt = new $classname; $crpt->password = $password; $rauth->challenge = $crpt->challenge; $rauth->chapid = $crpt->chapid; $rauth->response = $crpt->challengeResponse(); $rauth->flags = 1; // If you must use deprecated and weak LAN-Manager-Responses use this: // $rauth->lmResponse = $crpt->lmChallengeResponse(); // $rauth->flags = 0; break; case 'MSCHAPv2': $crpt = new Crypt_CHAP_MSv2; $crpt->username = $username; $crpt->password = $password; $rauth->challenge = $crpt->authChallenge; $rauth->peerChallenge = $crpt->peerChallenge; $rauth->chapid = $crpt->chapid; $rauth->response = $crpt->challengeResponse(); break; default: $rauth->password = $password; break; } if (!$rauth->start()) { printf("Radius start: %s<br>\n", $rauth->getError()); exit; } $result = $rauth->send(); if (PEAR::isError($result)) { printf("Radius send failed: %s<br>\n", $result->getMessage()); exit; } else if ($result === true) { printf("Radius Auth succeeded<br>\n"); } else { printf("Radius Auth rejected<br>\n"); } // get attributes, even if auth failed if (!$rauth->getAttributes()) { printf("Radius getAttributes: %s<br>\n", $rauth->getError()); } else { $rauth->dumpAttributes(); } $rauth->close(); ?> ]]> </programlisting> </para> <para> もうひとつの例です。 </para> <para> <programlisting role="php"> <![CDATA[ <?php /* vim: set expandtab tabstop=4 shiftwidth=4: */ /* Copyright (c) 2003, Michael Bretterklieber <michael@bretterklieber.com> All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 3. The names of the authors may not be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. This code cannot simply be copied and put under the GNU Public License or any other GPL-like (LGPL, GPL2) License. $Id: intro.xml,v 1.1 2007/01/05 12:23:57 takagi Exp $ */ require_once 'Auth/RADIUS.php'; require_once 'Crypt/CHAP.php'; $username = 'sepp'; $starttime = time(); $racct = new Auth_RADIUS_Acct_Start; $racct->addServer('localhost', 0, 'testing123'); $racct->username = $username; // RADIUS_AUTH_RADIUS => authenticated via Radius // RADIUS_AUTH_LOCAL => authenicated local // RADIUS_AUTH_REMOTE => authenticated remote $racct->authentic = RADIUS_AUTH_LOCAL; $status = $racct->start(); if(PEAR::isError($status)) { printf("Radius start: %s<br>\n", $status->getMessage()); exit; } // you can put any additional attributes here // $racct->putAttribute(RADIUS_ACCT_INPUT_PACKETS, 45236); // $racct->putAttribute(RADIUS_ACCT_OUTPUT_PACKETS, 1212); $result = $racct->send(); if (PEAR::isError($result)) { printf("Radius send failed: %s<br>\n", $result->getMessage()); exit; } else if ($result === true) { printf("Radius Acounting succeeded<br>\n"); } else { printf("Radius Acounting rejected<br>\n"); } $racct->close(); // Wait a bit, that we can put the session-time sleep(2); // send an accounting update $racct = new Auth_RADIUS_Acct_Update; $racct->addServer('localhost', 0, 'testing123'); $racct->username = $username; $racct->session_time = time() - $starttime; $status = $racct->start(); if(PEAR::isError($status)) { printf("Radius start: %s<br>\n", $status->getMessage()); exit; } $result = $racct->send(); if (PEAR::isError($result)) { printf("Radius send failed: %s<br>\n", $result->getMessage()); exit; } else if ($result === true) { printf("Radius Acounting succeeded<br>\n"); } else { printf("Radius Acounting rejected<br>\n"); } // Wait a bit, that we can put the session-time sleep(2); // send the stop $racct = new Auth_RADIUS_Acct_Stop; $racct->addServer('localhost', 0, 'testing123'); $racct->username = $username; $racct->session_time = time() - $starttime; $status = $racct->start(); if(PEAR::isError($status)) { printf("Radius start: %s<br>\n", $status->getMessage()); exit; } // you can put any additional attributes here // $racct->putAttribute(RADIUS_ACCT_TERMINATE_CAUSE, RADIUS_TERM_SESSION_TIMEOUT); $result = $racct->send(); if (PEAR::isError($result)) { printf("Radius send failed: %s<br>\n", $result->getMessage()); exit; } else if ($result === true) { printf("Radius Acounting succeeded<br>\n"); } else { printf("Radius Acounting rejected<br>\n"); } $racct->close(); ?> ]]> </programlisting> </para> </refsect1> </refentry> <!-- Keep this comment at the end of the file Local variables: mode: sgml sgml-omittag:t sgml-shorttag:t sgml-minimize-attributes:nil sgml-always-quote-attributes:t sgml-indent-step:1 sgml-indent-data:t sgml-parent-document:nil sgml-default-dtd-file:"../../../../manual.ced" sgml-exposed-tags:nil sgml-local-catalogs:nil sgml-local-ecat-files:nil End: vim600: syn=xml fen fdm=syntax fdl=2 si vim: et tw=78 syn=sgml vi: ts=1 sw=1 --> http://cvs.php.net/viewvc.cgi/peardoc/ja/package/authentication/auth-radius.xml?view=markup&rev=1.1 Index: peardoc/ja/package/authentication/auth-radius.xml +++ peardoc/ja/package/authentication/auth-radius.xml <?xml version="1.0" encoding="utf-8" ?> <!-- $Revision: 1.1 $ --> <!-- EN-Revision: 1.1 Maintainer: takagi Status: ready --> <sect1 id="package.authentication.auth-radius"> <title>Auth_RADIUS</title> <para> RADIUS のクライアント実装です。このパッケージには <ulink url="http://www.pecl.php/radius">RADIUS PECL 拡張モジュール</ulink> のラッパークラスが含まれます。 RADIUS Authentication (RFC2865) および RADIUS Accounting (RFC2866) の機能を提供します。 </para> &package.authentication.auth-radius.intro; </sect1> <!-- Keep this comment at the end of the file Local variables: mode: sgml sgml-omittag:t sgml-shorttag:t sgml-minimize-attributes:nil sgml-always-quote-attributes:t sgml-indent-step:1 sgml-indent-data:t sgml-parent-document:nil sgml-default-dtd-file:"../../../manual.ced" sgml-exposed-tags:nil sgml-local-catalogs:nil sgml-local-ecat-files:nil End: vim600: syn=xml fen fdm=syntax fdl=2 si vim: et tw=78 syn=sgml vi: ts=1 sw=1 -->
« previous php.pear.doc (#9217) next »