Server : Apache System : Linux webd348.cluster026.gra.hosting.ovh.net 5.15.148-ovh-vps-grsec-zfs-classid #1 SMP Thu Feb 8 09:41:04 UTC 2024 x86_64 User : hednacluml ( 122243) PHP Version : 8.3.9 Disable Function : _dyuweyrj4,_dyuweyrj4r,dl Directory : /home/hednacluml/univers/prive/transmettre/rss/ |
<?php if (!defined('_ECRIRE_INC_VERSION')) { return; } function trier_rss($texte) { if (preg_match_all(',<item.*</item>\s*?,Uims', $texte, $matches, PREG_SET_ORDER)) { $placeholder = '<!--REINSERT-->'; $items = []; foreach ($matches as $match) { if (preg_match(',<dc:date>(.*)</dc:date>,Uims', $match[0], $r)) { $items[strtotime($r[1])] = trim($match[0]); $texte = str_replace($match[0], unique($placeholder), $texte); } } krsort($items); $texte = str_replace($placeholder, implode("\n\t", $items) . "\n", $texte); } return $texte; }