. * * ------------------------------------------------------------------------ * * This file is used to manage the communication with the agent. * * ------------------------------------------------------------------------ * * @package FusionInventory * @author Vincent Mazzoni * @author David Durieux * @copyright Copyright (c) 2010-2016 FusionInventory team * @license AGPL License 3.0 or (at your option) any later version * http://www.gnu.org/licenses/agpl-3.0-standalone.html * @link http://www.fusioninventory.org/ * @link https://github.com/fusioninventory/fusioninventory-for-glpi * */ ob_start(); ini_set("memory_limit", "-1"); ini_set("max_execution_time", "0"); ini_set('display_errors', 1); if (session_id()=="") { session_start(); } if (!defined('GLPI_ROOT')) { include_once("../../../inc/includes.php"); } $_SESSION['glpi_use_mode'] = Session::NORMAL_MODE; if (!isset($_SESSION['glpilanguage'])) { $_SESSION['glpilanguage'] = 'fr_FR'; } $_SESSION['glpi_fusionionventory_nolock'] = true; ini_set('display_errors', 'On'); error_reporting(E_ALL | E_STRICT); $_SESSION['glpi_use_mode'] = 0; $_SESSION['glpiparententities'] = ''; $_SESSION['glpishowallentities'] = true; ob_end_clean(); header("server-type: glpi/fusioninventory ".PLUGIN_FUSIONINVENTORY_VERSION); if (!class_exists("PluginFusioninventoryConfig")) { header("Content-Type: application/xml"); echo " Plugin FusionInventory not installed! "; session_destroy(); exit(); } $pfCommunication = new PluginFusioninventoryCommunication(); if (!isset($rawdata)) { $rawdata = file_get_contents("php://input"); } if (isset($_GET['action']) && isset($_GET['machineid'])) { PluginFusioninventoryCommunicationRest::handleFusionCommunication(); } else if (!empty($rawdata)) { $pfCommunication->handleOCSCommunication($rawdata); } session_destroy();