cache_dir = './cache'; $rss->cache_time = 3600; // one hour // load some RSS file if ($xml = $rss->get('https://omoshiro.co/app/facebook/newsfeed_to_rss/rss/?k=c759b66fad3d31163e04f34a1641d9d0')) { $flg_img = 0; // here we can work with RSS fields foreach($xml['items'] as $item){ $link = $item['link']; $desc = $item['description']; $img = ''; if(preg_match('/< *img[^>]*src *= *["\']https:\/\/?([^"\']*)/i', $desc, $match)){ $img = "https://".$match[1]; $img = "\"\""; echo << $(window).load(function(){ $("#sonomichelin").append('$img'); }); EOM; $flg_img = 1; } if($flg_img == 1) break; } } else { die ('Error: RSS file not found...'); }