Member Offer
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Custom SimplePie Favicons

Discussion in 'Website Design Forum:' started by iEthan, Jun 19, 2009.

  1. iEthan

    iEthan Member

    So, I'm able to get all my XML content with the following code:

    // Require SimplePie

    // Initialize new feed
    $feed = new SimplePie(array(
    // Create a new array to hold data in
    $new = array();
    // Loop through all of the items in the feed
    foreach ($feed->get_items() as $item) {
    // Calculate 24 hours ago
    $yesterday time() - (24*60*60);
    // Compare the timestamp of the feed item with 24 hours ago.
    if ($item->get_date('U') > $yesterday) {
    // If the item was posted within the last 24 hours, store the item in our array we set up.
    $new[] = $item;
    // Loop through all of the items in the new array and display whatever we want.
    foreach($new as $item) {
    '<div id="item">';
    '<div class="date">' $item->get_date('M j, Y') . ' - ' $item->get_date('H:i:s') . '</div>';
    '<div class="content"><a href="' $item->get_permalink() . '">' $item->get_title() . '</a></div>';
    Now, for each of those feeds, I need to designate a custom favicon. How would I do this?

Share This Page