PHP RSS Feed Parser

Lezárva Kiadva: 5 évvel ezelőtt Kiszállításkor fizetve
Lezárva Kiszállításkor fizetve

I need one PHP function that takes the URL of any RSS news feed, loops on all the articles in the RSS feed and for each article will fill the following variables with the correct data:

$FeedURL -> Holds the rss feed url so it will be the same for all the articles

$ChannelTile -> Holds the rss feed title

$ArticleTitle -> Holds the article title

$ArticleLink -> Holds the article URL

$ArticleDesc -> Holds the article description

$ArticlePubDate -> Holds the article publish date

$ArticleImage -> Holds the article image URL (in case the article doesn't have an image then this variable should hold "[login to view URL]")

Please note the following:

1) One PHP function and no more than that

2) The function should be working fine with any feed from the attached excel list

3) While implementing the function you must test it using all the feeds in the excel file

4) All data must be filled in the mentioned variables

This is a sample function for reference, but note that this function doesn't work with all the feeds while the new function you will create needs to work with all the feeds:

$FeedURL = simplexml_load_file($URL);

$namespaces = $rss->getNamespaces(true);

$ChannelTitle = $rss->channel->title;

foreach ($rss->channel->item as $item) {

if(array_key_exists('media', $namespaces)) {

$media_content = $item->children($namespaces['media']);

foreach($media_content as $i){

$imageAlt = (string)$i->attributes()->url;

}

$ArticleImage = $item->image;

$ArticleImageAlt = $imageAlt;

} else {

$ArticleImage = "";

$ArticleImageAlt = "images/[login to view URL]";

}

$ArticleLink = $item->link;

$ArticleTitle = $item->title;

$ArticleDesc = $item->description;

$ArticlePubDate = $item->pubDate;

}

}

MySQL PHP Szoftverarchitektúra XML

Projektazonosító: #18376842

A projektről

5 ajánlat Távolról teljesíthető projekt Utoljára aktív: 5 évvel ezelőtt

5 szabadúszó tett átlagosan 47$ összegű árajánlatot erre a munkára

jayesh793

Hi Sir, I can certainly do the PHP RSS Feed for you, let us have a chat to discuss further. I'm a dedicated, details oriented, and passionate IT professional with an experience of 6+ years in website/applicatio Továbbiak

$35 USD 7 napon belül
(30 vélemény)
5.1