Advertisement
mudslide567

agent-polycom-logoff.php

Mar 23rd, 2011
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.55 KB | None | 0 0
  1. #!/usr/bin/php -q
  2. <?php
  3.  
  4. $phone = $_SERVER['argv'][1];
  5. $content = "No Agent Logged In";
  6.  
  7. $x = "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Strict//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd\">";
  8. $x .= "<html lang=\"en-US\" xml:lang=\"en-US\" xmlns=\"http://www.w3.org/1999/xhtml\">";
  9. $x .= "<head><title>Agent Status</title></head><body><p>" . $content . "</p></body></html>";
  10.  
  11. $file = '/var/www/html/polycom/'. $phone .'.xhtml' ;
  12.  
  13. if (file_exists($file)){unlink($file);}
  14. $s = fopen($file,"a");
  15. fputs ($s, $x);
  16. fclose($s);
  17.  
  18. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement