imap.php 526 B

1234567891011121314151617181920
  1. <?
  2. /**
  3. ** imap.php
  4. **
  5. ** Functions for the IMAP connection
  6. **
  7. **/
  8. /** Read from the connection until we get either an OK or BAD message. **/
  9. function imapReadData($connection) {
  10. $read = fgets($connection, 1024);
  11. $counter = 0;
  12. while ((substr($read, strpos($read, " ") + 1, 2) != "OK") && (substr($read, strpos($read, " ") + 1, 3) != "BAD")) {
  13. $data[$counter] = $read;
  14. $read = fgets($connection, 1024);
  15. $counter++;
  16. }
  17. return $data;
  18. }
  19. ?>