Net_NNTP::splitHeaders() -- fetch message headers into in array Описание
Returns all avaible header lines of a specified message
of the current selected newsgroup into an array
Возвращаемое значение
array - if message exists the headers
as array or a PEAR_Error, if fail.
The array is an associative array with the header names as key.
ЗаметкаЭта функция не должна вызываться статически. ПримерПример 34-1. Using splitHeaders()
<?php
...
$headers = $nntp->splitHeaders($msg_id);
if( PEAR::isError($headers)) {
// handle error
} else {
// success - print all headers line
foreach($headers as $headerName => $headerValue) {
echo $headerName.': '.$headerValue.'<br>';
}
}
?>
|
|
|