cvs: peardoc /en/package/authentication auth-radius.xml /en/package/authentication/auth-radius intro.xml
| From: | Greg Beaver | Date: | Tue, 21 Nov 2006 00:08:03 +0000 |
| Subject: | cvs: peardoc /en/package/authentication auth-radius.xml /en/package/authentication/auth-radius intro.xml | ||
| Groups: | php.pear.doc | ||
| Request: | Send a blank email to pear-doc+get-8843@lists.php.net to get a copy of this message | ||
cellog Tue Nov 21 00:08:03 2006 UTC
Added files:
/peardoc/en/package/authentication auth-radius.xml
/peardoc/en/package/authentication/auth-radius intro.xml
Log:
add new docs for Auth_RADIUS
# DISCLAIMER: I don't know jack **** about Auth_RADIUS, this is just
# a stub that describes what is needed and includes the sample
# scripts from the package. I will be occasionally doing this for packages
# that have no documentation to help stem the tide of undocumented things
http://cvs.php.net/viewvc.cgi/peardoc/en/package/authentication/auth-radius.xml?view=markup&rev=1.1 Index: peardoc/en/package/authentication/auth-radius.xml +++ peardoc/en/package/authentication/auth-radius.xml <!-- $Revision: 1.1 $ --> <sect1 id="package.authentication.auth-radius"> <title>Auth_RADIUS</title> <para> Client implementation of RADIUS. This package contains wrapper classes for the <ulink url="http://www.pecl.php/radius">RADIUS PECL extension</ulink>. Provides RADIUS Authentication (RFC2865) and 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 --> http://cvs.php.net/viewvc.cgi/peardoc/en/package/authentication/auth-radius/intro.xml?view=markup&rev=1.1 Index: peardoc/en/package/authentication/auth-radius/intro.xml +++ peardoc/en/package/authentication/auth-radius/intro.xml <?xml version="1.0" encoding="iso-8859-1" ?> <!-- $Revision: 1.1 $ --> <refentry id="packages.authentication.auth-radius.intro"> <refnamediv> <refname>Introduction</refname> <refpurpose> Basic usage of Auth_RADIUS </refpurpose> </refnamediv> <refsect1> <title>What is Auth_RADIUS?</title> <para> Auth_RADIUS is a php wrapper around the php radius extension. If you are unfamiliar with the RADIUS protocol, the <ulink url="http://en.wikipedia.org/wiki/RADIUS">Wikipedia article</ulink> provides an excellent introduction. </para> <para> Auth_RADIUS is structured around the facilities built into the radius extension. Understanding Auth_RADIUS generally first requires a basic understanding of how the radius extension is designed. Documentation of the radius extension is available through the PHP manual at <ulink url="&url.php.manual;en/ref.radius.php">&url.php.manual;en/ref.radius.php</ulink> </para> <para> There are different Classes for the different authentication methods available through RADIUS. If you are using CHAP-MD5 or MS-CHAP authentication, you will also need the <ulink url="&url.pear.package;Crypt_CHAP">Crypt_CHAP</ulink> package. In addition, if using MS-CHAP authentication, you will need to enable the mhash and mcrypt extension in php.ini, or compile them in statically. </para> <para> Note that if you have the latest radius extension (version 1.2 or newer), you will not need to enable the mcrypt extension. </para> </refsect1> <refsect1 id="packages.authentication.auth-radius.intro.how"> <title>How do I use Auth_RADIUS?</title> <para> Basic usage examples follow, pulled from the package itself. </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 2006/11/21 00:08:03 cellog 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> Here is the second example: </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 2006/11/21 00:08:03 cellog 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/en/package/authentication/auth-radius.xml?view=markup&rev=1.1 Index: peardoc/en/package/authentication/auth-radius.xml +++ peardoc/en/package/authentication/auth-radius.xml <!-- $Revision: 1.1 $ --> <sect1 id="package.authentication.auth-radius"> <title>Auth_RADIUS</title> <para> Client implementation of RADIUS. This package contains wrapper classes for the <ulink url="http://www.pecl.php/radius">RADIUS PECL extension</ulink>. Provides RADIUS Authentication (RFC2865) and 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 --> http://cvs.php.net/viewvc.cgi/peardoc/en/package/authentication/auth-radius/intro.xml?view=markup&rev=1.1 Index: peardoc/en/package/authentication/auth-radius/intro.xml +++ peardoc/en/package/authentication/auth-radius/intro.xml <?xml version="1.0" encoding="iso-8859-1" ?> <!-- $Revision: 1.1 $ --> <refentry id="packages.authentication.auth-radius.intro"> <refnamediv> <refname>Introduction</refname> <refpurpose> Basic usage of Auth_RADIUS </refpurpose> </refnamediv> <refsect1> <title>What is Auth_RADIUS?</title> <para> Auth_RADIUS is a php wrapper around the php radius extension. If you are unfamiliar with the RADIUS protocol, the <ulink url="http://en.wikipedia.org/wiki/RADIUS">Wikipedia article</ulink> provides an excellent introduction. </para> <para> Auth_RADIUS is structured around the facilities built into the radius extension. Understanding Auth_RADIUS generally first requires a basic understanding of how the radius extension is designed. Documentation of the radius extension is available through the PHP manual at <ulink url="&url.php.manual;en/ref.radius.php">&url.php.manual;en/ref.radius.php</ulink> </para> <para> There are different Classes for the different authentication methods available through RADIUS. If you are using CHAP-MD5 or MS-CHAP authentication, you will also need the <ulink url="&url.pear.package;Crypt_CHAP">Crypt_CHAP</ulink> package. In addition, if using MS-CHAP authentication, you will need to enable the mhash and mcrypt extension in php.ini, or compile them in statically. </para> <para> Note that if you have the latest radius extension (version 1.2 or newer), you will not need to enable the mcrypt extension. </para> </refsect1> <refsect1 id="packages.authentication.auth-radius.intro.how"> <title>How do I use Auth_RADIUS?</title> <para> Basic usage examples follow, pulled from the package itself. </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 2006/11/21 00:08:03 cellog 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> Here is the second example: </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 2006/11/21 00:08:03 cellog 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 -->