set($parameters); if(is_object($obj)){ $obj = _json_encode($obj); } header('Content-Type: application/json'); if (!empty($_REQUEST['gzip'])) { $obj = gzencode($obj, 9); header('Content-Encoding: gzip'); } header('Content-Length: ' . strlen($obj)); die($obj);