Re: Access cake data from external php script

2007-12-14 Thread Paolo
Thank you very much for all your answer. Just a note, I'm using 1.1, the stable version. Is 1.2 ready for a develepment environment? I see it is still beta or per-beta... I will try to work itout! Thanks On 14 Dic, 02:18, zonium <[EMAIL PROTECTED]> wrote: > Paolo, > This has been discussed > her

Re: Access cake data from external php script

2007-12-13 Thread zonium
Paolo, This has been discussed here: http://groups.google.com/group/cake-php/browse_thread/thread/8e5f487a944abeaf/e284ffdecdab0c69?lnk=gst&q=+cakephp+structure#e284ffdecdab0c69 A note : - if you use $Dispatcher->dispatch($action) you need to use output buffering On Dec 13, 8:29 am, Paolo <[EM

Re: Access cake data from external php script

2007-12-13 Thread francky06l
Paolo, If you use cake 1.2, you can set Router::parseExtension('xml') in core.php. If you call your action from external application, using "http:// myhost. com/app/controller/action.xml", cake will look for a ctp in this form view/xml/action.ctp (note the subfolder "xml"). In this view you can j

Re: Access cake data from external php script

2007-12-13 Thread Martin Wood-Mitrovski
What I have done when faced with a similar situation (existing php site / scripts needs stuff from my cake app) is to generate the required page fragments in cake and pull them in using file_get_contents($url_to_piece_of_cake) works fine. You'll probably want to create and use a layout just f

Re: Access cake data from external php script

2007-12-13 Thread francky06l
if you want only to retrieve data you could use your cake application as web service returning xml for example. Now if you want to return a view or part of a view, I guess you should make an $ajax request from your external application..(take care if you have links in the returned views).. hth O

Re: Access cake data from external php script

2007-12-13 Thread Paolo
No I just want to return data, I think the xml solution could be great! How can I tell cake not to render the page? Is there a method to create xml or should I create it by myself? Thanks On 13 Dic, 18:14, francky06l <[EMAIL PROTECTED]> wrote: > if you want only to retrieve data you could use yo