4 * FusionForge document search engine
6 * Copyright 2005, Fabio Bertagnin
7 * Copyright 2009-2011, Franck Villaume - Capgemini
8 * http://fusionforge.org
10 * This file is part of FusionForge. FusionForge is free software;
11 * you can redistribute it and/or modify it under the terms of the
12 * GNU General Public License as published by the Free Software
13 * Foundation; either version 2 of the Licence, or (at your option)
16 * FusionForge is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 * GNU General Public License for more details.
21 * You should have received a copy of the GNU General Public License along
22 * with FusionForge; if not, write to the Free Software Foundation, Inc.,
23 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
26 require dirname(__FILE__).'/../../include/env.inc.php';
28 require_once $gfcommon.'docman/engine/parser_text.inc.php';
31 echo "Usage : parser_html.php <filename>\n";
36 if (!is_file($fichin))
39 $fd = fopen($fichin, "r");
40 $contents = fread($fd, filesize($fichin));
43 $strip_content = strip_tags($contents);
44 $filename = tempnam(forge_get_config('data_path'), "tmp");
45 $fd = fopen($filename, "w");
46 fwrite($fd , $strip_content);
49 echo parser_text($filename);
54 // c-file-style: "bsd"