Code: Select all
$itsw_rss_feed = simplexml_load_file($itsw_feedurls[wp_rand(0,count($itsw_feedurls) - 1)]);
Code: Select all
if (!empty($itsw_rss_feed)) {
$i = 0;
foreach ($itsw_rss_feed->channel->item as $itsw_feed_item) {
if ($i >= 190) break;
{
$itsw_totalrecords[$i] = [
$itsw_feed_item->link,
array_slice(explode('', $itsw_feed_item->description), 0)[0],
$itsw_feed_item->title,
substr(array_slice(explode('', $itsw_feed_item->description), 0)[1], 0, -7)
];
}
$i ++;
}
Code: Select all
shuffle($itsw_totalrecords);
Mobile version