[eluser]Dahak-II[/eluser]
This is more a general PHP programming issue, most likely...
I'm re-writing a project that originally was processed as an ASP page.
I need to get an XML stream into a variable. Seems simple enough sounding.
My original local test setup had one script use CURL to post XML data to my CI controller. The target in the form of 'https://thissite.com/index.php/targetcontrollername'
In the controller, I could read the posted XML with:
Code:
$HTTP_RAW_POST_DATA = isset($HTTP_RAW_POST_DATA) ? $HTTP_RAW_POST_DATA : file_get_contents("php://input"); // ensure the variable exists
Even though the PHP 5 ini is configured to populate $HTTP_RAW_POST_DATA, it winds up being unset.
For my simpler purely local tests, the file_get_contents() call gets me my XML data, but is that the proper way to do so?
When I tried to use the CI controller as a target for the existing remote site's test environment, I get no XML to my controller.
What would be the most straightforward way to read an XML stream in a CI controller call?