[zurück]
Angepaßtes Beispiel aus dem Handbuch
Charset: ISO-8859-1
index.php
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
<?php
print('<p><u>Angepaßtes Beispiel aus dem Handbuch</u></p>');
function header_decode($text)
{
$elements = imap_mime_header_decode($text);
for ($i=0; $i<count($elements); $i++)
{
printf("Charset: %s<br>", htmlentities($elements[$i]->charset));
printf("Text: %s<br><br>",htmlentities($elements[$i]->text));
}
}
header_decode("=?ISO-8859-1?Q?Keld_J=F8rn_Simonsen?= <keld@example.com>");
header_decode("=?ISO-8859-15?B?xHJnZXIgaW0g3GJlcm1h3w==?=");
?>
######################## # # Autor: meikel at php minus help dot info # # The contents of this file are subject to the Mozilla Public License # Version 1.1 (the "License"); you may not use this file except in # compliance with the License. You may obtain a copy of the License at # http://www.mozilla.org/MPL/ # # Software distributed under the License is distributed on an "AS IS" # basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the # License for the specific language governing rights and limitations # under the License. ##########################