Anyone have any example scripts in PHP that connect to the manager? I'm not really a much of a programmer so I could use boost. Once I can figure out how to get it to login properly, I'll be ok from there. Thanks, Kevin _____________________________________________________________ Are you a Techie? Get Your Free Tech Email Address Now! Visit http://www.TechEmail.com
Kevin Bockman wrote:> Anyone have any example scripts in PHP that connect to the manager?I started a PHP * Manager API, modeled on the Perl API, but haven't had a lot of time to work on it. I'll be happy to give you what I do have. -- JustThe.net Internet & New Media Services 22674 Motnocab Road * Apple Valley, CA 92307-1950 Steve Sobol, Proprietor 888.480.4NET (4638) * 248.724.4NET * sjsobol@JustThe.net
--- Steve Sobol <sjsobol@JustThe.net> wrote: I started a PHP * Manager API, modeled on the Perl API, but haven't had a lot of time to work on it. I'll be happy to give you what I do have. _______________________________________________ Sure, I'd appreciate that. All I really need to start is to get it to login properly, as I stated. I think I can get the rest. Thanks, Kevin _____________________________________________________________ Are you a Techie? Get Your Free Tech Email Address Now! Visit http://www.TechEmail.com
Here is my example. I'm using a lot of times a day.
<?php
$socket = fsockopen("192.168.0.53","5038", $errno, $errstr,
$timeout);
fputs($socket, "Action: Login\r\n");
fputs($socket, "UserName: admin\r\n");
fputs($socket, "Secret: blabla\r\n\r\n");
fputs($socket, "Action: Command\r\n");
fputs($socket, "Command: reload\r\n\r\n");
$wrets=fgets($socket,128);
?>
Regards,
Gus
----- Original Message -----
From: "Kevin Bockman" <kbockml@techemail.com>
To: <asterisk-users@lists.digium.com>
Sent: Sunday, November 02, 2003 6:42 PM
Subject: [Asterisk-Users] PHP Manager examples
> Anyone have any example scripts in PHP that connect to the manager?
I'm
not really a much of a programmer so I could use boost. Once I can figure
out how to get it to login properly, I'll be ok from
there.>
> Thanks,
>
> Kevin
>
> _____________________________________________________________
> Are you a Techie? Get Your Free Tech Email Address Now! Visit
http://www.TechEmail.com> _______________________________________________
> Asterisk-Users mailing list
> Asterisk-Users@lists.digium.com
> http://lists.digium.com/mailman/listinfo/asterisk-users