| 458 |
} |
} |
| 459 |
} |
} |
| 460 |
|
|
|
function decode_quoted_pair($value) { |
|
|
return(ereg_replace('\\\\(.)',"\\1",$value)); |
|
|
} |
|
|
|
|
| 461 |
function getTimestamp($value) { |
function getTimestamp($value) { |
| 462 |
$months=array("Jan"=>1,"Feb"=>2,"Mar"=>3,"Apr"=>4,"May"=>5,"Jun"=>6,"Jul"=>7,"Aug"=>8,"Sep"=>9,"Oct"=>10,"Nov"=>11,"Dec"=>12); |
$months=array("Jan"=>1,"Feb"=>2,"Mar"=>3,"Apr"=>4,"May"=>5,"Jun"=>6,"Jul"=>7,"Aug"=>8,"Sep"=>9,"Oct"=>10,"Nov"=>11,"Dec"=>12); |
| 463 |
$value=str_replace(" "," ",$value); |
$value=str_replace(" "," ",$value); |
| 572 |
} |
} |
| 573 |
|
|
| 574 |
function decode_structured_body ($body) { |
function decode_structured_body ($body) { |
| 575 |
ereg("(\"([^\"]+|\\\\.)*\"|\\(([^()]+|\\\\.)*\\)|[^\"])+", $body, $element); |
$patterns = array ("/\"((?:[^\"\\\\]+|\\\\.)*)\"/e"); |
| 576 |
return join('-', $element); |
$replace = array ("mb_convert_encoding(decode_quoted_pair('\\1'), 'EUC-JP', 'auto')"); |
| 577 |
|
return preg_replace ($patterns, $replace, $body); |
| 578 |
|
} |
| 579 |
|
|
| 580 |
|
function decode_quoted_pair($value) { |
| 581 |
|
$value = ereg_replace('\\\\(\\\\")', "\\1", $value); |
| 582 |
|
return ereg_replace('\\\\(.)', "\\1", $value); |
| 583 |
} |
} |
| 584 |
|
|
| 585 |
function decode_body($body,$encoding) { |
function decode_body($body,$encoding) { |