Updated all php3's to php's
[squirrelmail.git] / functions / imap.php
CommitLineData
3302d0d4 1<?
2 /**
3 ** imap.php3
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?>