The method GetDynamicList returns the number of hits
(indexed pages) for the specified search
engine on daily basis.
Parameters
Parameter
Description
searcher_id
The search engine ID.
by
Sorting field. Possible values:
s_date - date.
order
Sort order; the following values are possible:
asc - ascending;
desc - descending.
max_min
Reference to an array containing the earliest and latest dates of
the returned list. The array has the following structure:
Array
(
[DATE_FIRST] => the earliest date
[MIN_DAY] => day of the earliest date (1-31)
[MIN_MONTH] => month of the earliest date (1-12)
[MIN_YEAR] => year of the earliest date
[DATE_LAST] => the latest date
[MAX_DAY] => day the latest date (1-31)
[MAX_MONTH] => month the latest date (1-12)
[MAX_YEAR] => year the latest date
)
filter
Array used to filter the resulting list. The following keys can be used in the array:
DATE1 - minimum value of the "date" field;
DATE2 - maximum value of the "date" field.
Structure of the returned record
Array
(
[DATE_STAT] => date
[DAY] => day ordinal (1-31)
[MONTH] => month ordinal (1-12)
[YEAR] => year
[TOTAL_HITS] => hit count (number of indexed pages)
)
<?
$searcher_id = 1;
// Set the filter to match December 2005
$arFilter = array(
"DATE1" => "01.12.2005",
"DATE2" => "31.12.2005"
);
// obtain the list of records
$rs = CSearcher::GetDynamicList(
$searcher_id,
($by="s_date"),
($order="desc"),
$arMaxMin,
$arFilter
);
// print the array with max and min dates
echo "<pre>"; print_r($arMaxMin); echo "</pre>";
// print all records
while ($ar = $rs->Fetch())
{
echo "<pre>"; print_r($ar); echo "</pre>";
}
?>