I’m trying to use some data from another site as a news feed on mine that will automatically update. I have permission to use this information.
I’m trying to decide whether to just use the RSS feed and add that to my site or use the Command Curl.
What do you recommend using?
I want the text to go in to a rectangle space in a div on my page and so i can customize this to go with the colour and design of my page.
Thanks
If there is a RSS, use that! That’s where it’s for.
Get the text of the RSS, and display it in a div.
You should also link to the page, which is provided in the RSS, as that is in most cases something the owner would want.
Use
simplexml_load_file()function to read the RSS, and proceed with it using simpleXML. See also some documentation:You should be able to handle it on your own. If you don’t, try to do some tutorials on simplexml or even PHP