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