include "../inc/phpop3.inc";
$sock=pop3open("localhost",110,"undead","ingmar",&$errno);
echo $errno;
$stat=pop3stat($sock);
echo "Messagebox: ".$stat[msgs]." message claiming ".$stat[size]." bytes.
\n";
$msg=pop3getmessage($sock,4);
$hdr=pop3extractheader($msg[0][hdr]);
reset($hdr);
echo "Header is parsed as followed:
\n
"; while(list($key,$val)=each($hdr)) { echo htmlentities("$key: $val")."\n"; } echo ""; ?>