Net_NNTP_Realtime::getOverview() -- Fetch newsgroup overview Описание
Returns (a certain range of) the overview of the currently selected newsgroup.
selected newsgroup
Параметр
$first - first article number, start of the range
$last - last article number, end of the range
Возвращаемое значение
array - a nested array
indicated by the message id of the article, every entry contains
the header as array
<?php
$msgs[message_id][headername] = headercontent
?>
|
ЗаметкаЭта функция не должна вызываться статически. Внимание |
Be careful with choosing the range. It could requires some time
to get a huge number of message headers.
|
ПримерПример 34-1. Using getOverview()
<?php
...
$ret = $nntp->connect('news.php.net');
if( PEAR::isError($ret)) {
// handle error
} else {
// print the last 10 messages
$data = $nntp->selectGroup('php.pear.dev');
$msgs = $nntp->getOverview( $data['last'] - 10, $data[last]);
foreach($msgs as $msg) {
// print subjects
echo $msg['subject'].'<br>';
}
}
?>
|
|
|