the situation is like this, i was asked to use the header and footer of a dynamic site
made up of yii into another site hosted in a different server/host..
i created a controller and view in the dynamic site, now the question is
how to call that within the other site to use it , let’s say the site is html or php ?
given this example url of the controller and action that i created
http://www.example.com/controller/display/header
http://www.example.com/controller/display/footer
This, isn’t going to work in the context your thinking. More so if its PHP based, as your not going to get the PHP functionality that makes the header or footer what it might be. As PHP renders server side when called on.
You could if its static HTML only maybe use cURL to access the file, and get the contents of it (again, the rendered HTML if php based). But other than that, there is so many things from the browser side to the server side of the remote server that are going to hinder your ability of doing what I think your trying to do, cause if it was that easy people would be hijacking sites left and right..
You could in concept open these remote locations in a frame/iframe but you won’t have control over there content. I’d say if you are the owner of both sites in question or working in collaboration with the other site owner. Then you two should come up with a means of delivering the content of footer/header to your site, that doesn’t break so many policies and risk serious security breaches.
In all though I can’t imagine why you wouldn’t just clone the look/feel through normal templating via HTML/CSS. Anything else just sounds a bit shaddy.
SomeKittens makes a valid point. But I just wanted to put my 2 cents in.