[thelist] php and pop3 question

Burhan Khalid burhankhalid at members.evolt.org
Tue Jun 18 11:15:01 CDT 2002


> Im writing some php code to check a remote pop3 account,
[ snip ]
Why reinvent the wheel? Check this out :
http://www.thewebmasters.net/php/class.POP3.phps
If you still plan to use your own function, I would suggest this snippet
(from the above class) :

	  $count = 0;
        $MsgArray = array();

        $line = fgets($fp,$buffer);
        while ( !ereg("^\.\r\n",$line))
        {
            $MsgArray[$count] = $line;
            $count++;
            $line = fgets($fp,$buffer);
            if(empty($line))    { break; }
        }

hth
--Burhan





More information about the thelist mailing list