PHP RSS Feed Parser

Cerrado Publicado hace 5 años Pagado a la entrega
Cerrado Pagado a la entrega

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 Arquitectura de software XML

Nº del proyecto: #18376842

Sobre el proyecto

5 propuestas Proyecto remoto Activo hace 5 años

5 freelancers están ofertando un promedio de $47 por este trabajo

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 Más

$35 USD en 7 días
(30 comentarios)
5.1