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