* along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * */ require 'ucsysconfig.inc.php'; require 'ucserver.inc.php'; require LIB_DIR . 'http_request.inc.php'; require INC_DIR . 'ucs_nodes_poll.inc.php'; // check total node poll $total_conn = ucs_nodes_poll::check_poll($dbs); if ($total_conn >= $sysconf['server']['max_node_all']) { die(json_encode(array('status' => 'POLL_MAX', 'message' => 'Sorry for inconvinience, server connection poll is busy right now. Please try again later'))); } // create http request object $http_request = new http_request(); $http_request->get_http_request(); // get http content $referer = trim($http_request->headers('REFERER')); $body = trim($http_request->body()); // sent HTTP header header('Content-type: text/json'); // check content if ($body) { // encode to PHP array $biblio = json_decode($body, true); if (function_exists('json_last_error')) { // Define the errors. $json_errors = array(JSON_ERROR_DEPTH => 'JSON error: The maximum stack depth has been exceeded', JSON_ERROR_CTRL_CHAR => 'JSON error: Control character error, possibly incorrectly encoded', JSON_ERROR_SYNTAX => 'JSON error: Syntax error'); // get json error $json_error = json_last_error(); if ($json_error) {