Advertisement
adam-prescott

Parsing E-Mails from PIPE

Feb 13th, 2012
108
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.21 KB | None | 0 0
  1. #!/usr/bin/php -q
  2. <?php
  3.  
  4. // read from stdin
  5. $fd = fopen("php://stdin", "r");
  6. $email = "";
  7. while (!feof($fd))
  8. {
  9.     $email .= fread($fd, 1024);
  10. }
  11. fclose($fd);
  12.  
  13.  
  14. // The Data to parse is in $email
  15.  
  16. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement