Welcome Guest, Not a member yet? Register   Sign In
Reading XML streams
#1

[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?


Messages In This Thread
Reading XML streams - by El Forum - 02-11-2009, 10:33 AM
Reading XML streams - by El Forum - 02-11-2009, 02:41 PM
Reading XML streams - by El Forum - 02-11-2009, 03:03 PM
Reading XML streams - by El Forum - 02-11-2009, 03:42 PM
Reading XML streams - by El Forum - 03-25-2009, 04:51 PM



Theme © iAndrew 2016 - Forum software by © MyBB