Radclient & PHP

AHMED KHIDR a.khidr at gmail.com
Thu Apr 2 03:58:22 CEST 2009


Thanks ,
 I tried it but didn't work ,
I found another method ,

Here is the code ,


<?
$user="ahmedkhidr";
$nas="1.1.1.2";
$secret="password";
$handle = popen('/bin/echo User-Name='.$user.' | /usr/local/bin/radclient -x
'.$nas.':1700 disconnect '.$secret.' 2>&1', 'r');
$read = fread($handle, 2096);
echo $read;
pclose($handle);

?>
Don't forget to chmod the /usr/local/etc/raddb/dictionary to be 644


Regards
On Thu, Apr 2, 2009 at 3:14 AM, Paul Bartell <paul.bartell at gmail.com> wrote:

> try
> exec() or shell_exec()
>
> 2009/4/1 AHMED KHIDR <a.khidr at gmail.com>:
>  > Hii All ,
> >
> > Please Any one have an idea how to make a PHP code to  run Radclient in
> > order to disconnect users ,
> >
> > Thanks
> > -
> > List info/subscribe/unsubscribe? See
> > http://www.freeradius.org/list/users.html
> >
>
>
>
> --
> Random quote of the week/month/whenever i get to updating it:
> "Opportunity knocked. My doorman threw him out." - Adrienne Gusoff
>
> "At school you don't get parole, good behavior only brings a longer
> sentence." - The History Boys
>
> -
> List info/subscribe/unsubscribe? See
> http://www.freeradius.org/list/users.html
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freeradius.org/pipermail/freeradius-users/attachments/20090402/691e4efc/attachment.html>


More information about the Freeradius-Users mailing list