Loading xml from another server with CakePHP 2.1

tsunnoke

New Member
In CakePHP 2.1, how do I pass XML data from one server to another. I assume that Xml::build() would allow me to retrieve data through GET, but I need to POST, so I have been trying to use HttpSocket, which causes data to lose any of its tags (unusable).On the other hand, I need to consider servicing the requests, and I can't get content-type to set correctly. I've tried\[code\]$this->response->header(array('Content-type' => 'text/xml'));\[/code\]and\[code\]$this->header('Content-Type: text/xml');\[/code\]Neither of the two work. If anyone has done something similar to this or knows how to get any of this working, help would be appreciated.
 
Back
Top