GetNewsEx
Description and parameters
array
CIBlockRSS::GetNewsEx(
string SITE,
string PORT,
string PATH,
string QUERY_STR,
bool bOutChannel = false
);
Loads XML from specified address and parses into array. The user-agent's value uses "BitrixSMRSS". After uploading, XML will be converted into current site encoding. If errors occur, the results array will be empty. Non-static method.
Note: XML is cached at the specified time in the TTL, or, it time is not specified, caches for one hour.
Call parameters
Parameter | Description | Available from version |
---|---|---|
SITE | IP address or site domain name. | |
PORT | Port number to be connected. Default HTTP port - 80. | |
PATH and QUERY_STR | Connected via question mark ("?") and passed HTTP command GET. | |
bOutChannel | Requires to be true, if news items are located outside channel element. |
Returned value
Array with displayed XML.
See Also
- CIBlockRSS::[link=129574]FormatArray[/link]
Examples
<?
$arRSS = CIBlockRSS::GetNewsEx('www.1c-bitrix.ru', '80', '/bitrix/rss.php', 'ID=news_sm&LANG=ru&TYPE=news&LIMIT=5');
print_r($arRSS);
?>
© «Bitrix24», 2001-2024