Parse RSS feed, then... Possible with PHP?

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
_spahz
Forum Newbie
Posts: 3
Joined: Wed Jul 09, 2008 10:15 am

Parse RSS feed, then... Possible with PHP?

Post by _spahz »

My first post. :D

I know virtually nothing about PHP programming. I will be hiring a PHP programmer for a custom script, but I'm looking for a few answers first. My main goal is how convey my idea to the programmer so they understand what needs to be done.

1. Is the scenario below possible with PHP?
2. If it is possible, what is the best way to execute the scenario?
3. If it is possible, how would I convey this to the programmer so they understand best?

The script should:
  • 1. Parse a news feed (RSS/Atom/RDF) using SimplePie API
    2. Follow the title URL of each story (example feed, follows to article)
    3. Parse the article on the page (is this possible?)
    4. Filter/rewrite certain things (e.g. <br> becomes <br />)
    5. Return the cleaned article for further modification and posting to my website
Seems simple enough, but again, I know virtually nothing about programming PHP.
User avatar
Eran
DevNet Master
Posts: 3549
Joined: Fri Jan 18, 2008 12:36 am
Location: Israel, ME

Re: Parse RSS feed, then... Possible with PHP?

Post by Eran »

PHP is well equipped to deal with everything you mentioned. Your description of your needs is pretty good too - I would elaborate a little on each topic to help the programmer know exactly what you need (for example, what does posting the article to your website means? do you want it stored in a database, in a static file or submitted by a request to an API?)
_spahz
Forum Newbie
Posts: 3
Joined: Wed Jul 09, 2008 10:15 am

Re: Parse RSS feed, then... Possible with PHP?

Post by _spahz »

Appreciated, pytrin. My main hangup is "3. Parse the article on the page (is this possible?)"...

Is that going to be complicated or is PHP well-equipped for doing such a thing?

Any other suggestions?
User avatar
Eran
DevNet Master
Posts: 3549
Joined: Fri Jan 18, 2008 12:36 am
Location: Israel, ME

Re: Parse RSS feed, then... Possible with PHP?

Post by Eran »

You have to be more specific when you say 'parse the article' since that could mean almost anything. What exactly does this parsing involve?
_spahz
Forum Newbie
Posts: 3
Joined: Wed Jul 09, 2008 10:15 am

Re: Parse RSS feed, then... Possible with PHP?

Post by _spahz »

pytrin wrote:You have to be more specific when you say 'parse the article' since that could mean almost anything. What exactly does this parsing involve?
How would you say it? Parsing just involves the script examining an RSS/Atom news feed and returning the data -- storing it as a variable in the SQL database.
User avatar
Eran
DevNet Master
Posts: 3549
Joined: Fri Jan 18, 2008 12:36 am
Location: Israel, ME

Re: Parse RSS feed, then... Possible with PHP?

Post by Eran »

Ok, so you meant parsing the feed. I thought you might have meant performing some scrapping to the content.
Yes, PHP is very adapt at parsing all the popular feed formats, and there are many open-source solutions available that do just that.
Post Reply