renderPartial question

I have two websites that need to share some information, and I would like to use the same styling in the display. The scenario is that I have set up a server (site2) to store podcast audio files that my main site (site1) host has a problem with storing. So site1 wants to pull a listing of podcasts from site2.

I was thinking of the following in the site2 controller:




if (isset($_GET['return'])) {

   $this->renderPartial('_index', array('dataprovider'=>$dataProvider), true);

} else {

   $this->render('index',array('dataprovider'=>$dataProvider));

}

In site1, I was thinking about:




   echo file_get_contents('http://site2/index.php?return');



I figure I’m gonna have to pull the css file somehow, but I’ll work on that later. Anybody have any ideas, comments, thoughts, etc. that can help me figure this out? Thanks

Why not use REST ?

Get the raw data from your web store and present it on the client?

Really a noob here, What is REST? How to get ‘raw data’?

Sort of like Facebook API

REST => http://en.wikipedia.org/wiki/Representational_State_Transfer

GET PUT POST DELETE

http://en.wikipedia.org/wiki/Representational_State_Transfer#RESTful_web_services

And how to do this with YII:

http://www.yiiframework.com/wiki/175/how-to-create-a-rest-api/#hh15

It’s just an idea.

But, of course, it would probably be more efficient to talk to the machine directly - that depends on things. :)