| | |
| | | } |
| | | if ($error && preg_match('/^\* (BYE|BAD) /i', $string)) { |
| | | return true; |
| | | |
| | | } |
| | | return false; |
| | | } |
| | |
| | | $lines[++$ln] = trim($line); |
| | | } |
| | | // patch from "Maksim Rubis" <siburny@hotmail.com> |
| | | } while (trim($line[0]) != ')' && strncmp($line, $key, strlen($key))); |
| | | } while ($line[0] != ')' && !iil_StartsWith($line, $key, true)); |
| | | |
| | | if (strncmp($line, $key, strlen($key))) { |
| | | // process header, fill iilBasicHeader obj. |
| | |
| | | } |
| | | else |
| | | $prev = ''; |
| | | |
| | | |
| | | if ($file) |
| | | fwrite($file, base64_decode($line)); |
| | | else if ($print) |
| | |
| | | } |
| | | } |
| | | } |
| | | |
| | | // read in anything up until last line |
| | | if (!$end) |
| | | do { |
| | |
| | | } while (!iil_StartsWith($line, $key, true)); |
| | | |
| | | if ($result) { |
| | | $result = rtrim($result, "\t\r\n\0\x0B"); |
| | | if ($file) { |
| | | fwrite($file, $result); |
| | | } else if ($print) { |
| | | echo $result; |
| | | } else |
| | | return $result; // substr($result, 0, strlen($result)-1); |
| | | return $result; |
| | | |
| | | return true; |
| | | } |
| | | } |
| | | |
| | | |
| | | return false; |
| | | } |
| | | |