Code: Select all
if (isset($HTTP_RAW_POST_DATA)) {
$request_xml = $HTTP_RAW_POST_DATA;
}
else {
$request_xml = implode("\r\n", file('php://input'));
}
- Created a module (API)
- Set up the default page to capture the raw data
- Added a content page to call the API module - {cms_module module="API"}
- Called the API from another website using Curl
I created a page on the root with the same code as the API module default page, and that worked fine. I would use this page but I don't know how to call the modules from there as it is not part of the cmsms.
Any idea why the HTTP_RAW_POST_DATA is not being read?