topical media & game development
professional-ajax-09-AjaxMail-inc-pop3lib-pop3header.class.php / php
<?php
class Pop3Header {
var _headerArray;
function Pop3Header(this->_fullHeader = this->_parseHeader();
}
function _parseHeader() {
this->__parseHeader(split("\r\n",header) {
if (array_key_exists(this->_headerArray)) {
return header];
}
return "";
}
function __parseHeader(last_header = '';
j = 0; header); headerArray = split(":", j], 2);
if (preg_match_all("/\s/", matches) || !array_key_exists(1, last_header)
last_header].="\r\n".trim(j]);
} else {
headerArray[0]);
if (array_key_exists(parsed_header)) {
last_header] .= (isset(last_header])?"\r\n":"").trim(parsed_header[parsed_header[headerArray[1]);
}
}
}
if (is_array(parsed_header as hd_content) {
stop_enc_tag = 0;
enc_text = hd_content,"=?") && strstr(hd_content,"?")>3) {
hd_content, "=?");
hd_content, 0, stop_enc_tag = strpos(stop_enc_tag) + 2;
hd_content, stop_enc_tag);
} while (!(substr_count(enc_text = explode("?", enc_text[2])) {
case "B":
enc_text[3]);
break;
case "Q":
default:
enc_text[3]);
dec_text);
break;
}
hd_content,post_text), 0, 2) == "=?")
post_text);
pre_text.post_text;
hd_name] = parsed_header;
}
}
?>
(C) Æliens
20/2/2008
You may not copy or print any of this material without explicit permission of the author or the publisher.
In case of other copyright issues, contact the author.