www-thermferm/utilities.php

changeset 155
0d86f3c0a07b
parent 137
e4518fd9b626
child 173
7259ee8778e9
equal deleted inserted replaced
154:83502d2099eb 155:0d86f3c0a07b
92 } 92 }
93 {location.href="'.$url.'";} 93 {location.href="'.$url.'";}
94 </script>'; 94 </script>';
95 } 95 }
96 96
97
98 /*
99 * Send command
100 */
101 function send_cmd($cmd) {
102 $sock = open_socket();
103 if ($sock != false) {
104 /*
105 * Send command and absorb the result.
106 */
107 socket_write($sock, $cmd, 4096);
108 while (1) {
109 $line = socket_read($sock, 4096);
110 if ($line === '')
111 break;
112 }
113 socket_close($sock);
114 }
115 }
116
117

mercurial