MOON
Server: Apache/2.2.34 (Unix) mod_ssl/2.2.34 OpenSSL/0.9.8e-fips-rhel5 mod_bwlimited/1.4 FrontPage/5.0.2.2635
System: Linux server.asjudinet.com 2.6.32-042stab141.3 #1 SMP Fri Nov 15 22:45:34 MSK 2019 i686
User: asjudine (504)
PHP: 5.2.17
Disabled: NONE
Upload Files
File: //proc/3/root/usr/share/doc/cpanel-php54-Horde-Feed-2.0.1/examples/delete.php
<?php
/**
 * Example of deleting Atom posts with Horde_Feed.
 *
 * @package Feed
 */

/* Get a Horde framework include_path set up. */
require 'Horde/Autoloader.php';

/* Load the feed we want to delete something from. */
try {
    $feed = Horde_Feed::readUri('http://www.example.com/Feed/');
} catch (Horde_Feed_Exception $e) {
    die('An error occurred loading the feed: ' . $e->getMessage() . "\n");
}

/* We want to delete all entries that are two weeks old. */
$twoWeeksAgo = strtotime('-2 weeks');
foreach ($feed as $entry) {
    /* Check the updated timestamp. */
    if (strtotime($entry->updated) >= $twoWeeksAgo) {
        continue;
    }

    /* Deleting the old posts is easy. */
    try {
        $entry->delete();
    } catch (Horde_Feed_Exception $e) {
        die('An error occurred deleting feed entries: ' . $e->getMessage() . "\n");
    }
}