Yii Framework Forum: How To Bring Latest News Articles From Some Website - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

How To Bring Latest News Articles From Some Website Rate Topic: -----

#1 User is offline   Shaani 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 132
  • Joined: 17-July 12

Posted 22 November 2012 - 06:35 AM

In my yii website I want to display a list of latest news related to property and when the user clicks on the link it should display the article on my website. The list would come from gulf property news The news article content coming from http://gulfnews.com/...h419m-1.1107279. In my website the content would be displayed according to my theme and layout. How can I accomplish this ?
0

#2 User is offline   Keith 

  • Elite Member
  • Yii
  • Group: Moderators
  • Posts: 1,670
  • Joined: 04-March 10
  • Location:UK

Posted 22 November 2012 - 06:40 AM

I guess you'll have to use something like file_get_contents() to get the page content, then you'd have to either attempt to walk the page content by parsing it as XML, or extract the content of a specific tag using regexes or strpos.

This is assuming they don't offer any sort of web service.
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users