connect("sci.smolensk.ru",110)) { echo "Ooops $pop3->ERROR
\n"; exit; } $login = 'igor'; $pass = 'an69'; $Count = $pop3->login($login,$pass); if( (!$Count) or ($Count == -1) ) { echo "

Login Failed: $pop3->ERROR

\n"; exit; } // ONLY USE THIS IF YOUR PHP VERSION SUPPORTS IT! # register_shutdown_function($pop3->quit()); if ($Count < 1) { echo "Login OK: Inbox EMPTY
\n"; } else { echo "Login OK: Inbox contains [$Count] messages
\n"; } $totalsize=0; $list = $pop3->pop_list(); for ($i = 1; $i <= $Count; ++$i) { echo "$i - $list[$i]
\n"; $totalsize += $list[$i]; } echo "total size - $totalsize
\n"; echo "
\n"; $stat = $pop3->popstat(); echo "
\n"; # $n_stat = count($stat); # echo "totl elem - $n_stat
\n"; # for ($idx = 0; $idx < $n_stat; ++$idx) # { # echo "$idx - $stat[$idx]
\n"; # } echo "
\n"; echo "header message

\n"; $top=1; $i =1; while ($i <= $Count) { $top = $pop3->top($i,1); $n_top = count($top); echo "message $i

\n"; for ($idx = 0; $idx < $n_top; ++$idx) { echo "$idx - $top[$idx]
\n"; } ++$i; echo "

\n"; } # $MsgOne = $pop3->get(1); # if( (!$MsgOne) or (gettype($MsgOne) != "array") ) # { # echo "oops, $pop3->ERROR
\n"; # exit; # } # while ( list ( $lineNum,$line ) = each ($MsgOne) ) # { # echo "$line
\n"; # } # if(!$pop3->delete(1)) # { # echo "oops $pop3->ERROR
\n"; # $pop3->reset(); # exit; # } else { # echo "Message 1 Deleted
\n"; # } # exit; # # ?>