1<?php 2 3/** 4 * DokuWiki AJAX call handler 5 * 6 * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) 7 * @author Andreas Gohr <andi@splitbrain.org> 8 */ 9 10if (!defined('DOKU_INC')) define('DOKU_INC', __DIR__ . '/../../../'); 11require_once(DOKU_INC . 'inc/init.php'); 12 13#include_once('/var/www/html/zdebug/inc.php'); 14 15//close session 16session_write_close(); 17 18//mb_internal_encoding("UTF-16"); 19 20// default header, ajax call may overwrite it later 21header('Content-Type: text/html; charset=utf-8'); 22$input = file_get_contents('php://input'); 23 24// Unpack 25$id = substr($input,0,5); 26$md5 = substr($input,5,32); 27$text = substr($input,37); 28//sleep(5); 29$info = []; 30$html = p_render('xhtml', p_get_instructions($text), $info); 31echo $id.md5($html).$html; 32 33