Unclassified NewsBoard Code Reference

MimeGetHeaderValue function

Find the value of a header line like "Date: <...>"

function MimeGetHeaderValue ($hdr, $key);

Parameters:

hdr
key

Return value:

(string) requested value | false on error

Remarks:

respects rfc822 "folded" (multiline) notation (rfc822/3.1.1)
automatically recognizes mime 'encoded-word's and decodes them

pass it the headers as array split on \n and the key (i.e. "Date", w/o ":") you want the value to

Implementation file: unb_lib/mime.lib.php, line 98

© 2006 Yves Goergen. Unclassified NewsBoard Homepage. Reference based on UNB unb.devel.20060128, dated 2006-01-28.