[Asterisk-Users] Submit commands thru web & php
CW_ASN
cw_asn at fibertel.com.ar
Sat Sep 13 19:10:19 MST 2003
Hi all:
I was reading a time ago back the necessity to make * reloads from web
pages. Here is a small script in php to make charges of the system via Web.
Is dangerous, I know, but it must have some cases where its applicable. Was
taken from phpconfig, asterisk.reload perl script.
Regards,
Gus
<?php
$socket = fsockopen("172.16.254.96","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);
?>
More information about the asterisk-users
mailing list