Page 1 of 1

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

Posted: Wed Jul 09, 2008 10:46 am
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.

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

Posted: Wed Jul 09, 2008 11:03 am
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?)

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

Posted: Wed Jul 09, 2008 11:25 am
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?

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

Posted: Wed Jul 09, 2008 2:04 pm
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?

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

Posted: Wed Jul 09, 2008 2:55 pm
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.

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

Posted: Wed Jul 09, 2008 3:03 pm
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.