- #!/usr/local/bin/php -q
- <?php
- require('phpagi.php');
- // Play the "Enter the host you wish to ping, followed by the pound sign" prompt
- // and then play the beep.
- /* Danger Will Robinson! This does NOT properly escape the ping command!
- * Someone could subvert your system if you don't fix this! - NO WARRANTY :P */
- $execstr = "/bin/ping -c 5 -q -w 9 $ip|grep transmitted";
- // be polite.
- if($p == FALSE)
- {
- }
- else
- {
- $str = '';
- {
- if(!$r) break;
- $str .= $r;
- }
- // a minor hack.
- // have festival read back the ping results.
- }
- ?>
http://phpagi.sourceforge.net/phpagi22/api-docs/
No hay comentarios:
Publicar un comentario