//http:/127.0.0.1/cmd.php?cmd=queue%20show%20support
$command=$_GET['cmd'];
$socket = fsockopen("127.0.0.1","5038", $errno, $errstr,60);
if (!$socket){
echo "$errstr ($errno)\n";
}else{
fputs($socket, "Action: Login\r\n");
fputs($socket, "UserName: arodrigue\r\n");
fputs($socket, "Secret: mypass2\r\n\r\n");
fputs($socket, "Action: Command\r\n");
fputs($socket, "Command: $command\r\n\r\n");
fputs($socket, "Action: Logoff\r\n\r\n");
while (!feof($socket)){
echo fgets($socket).'<br>';
}
fclose($socket);
}
?>
No hay comentarios:
Publicar un comentario