4 * FusionForge document search engine
6 * Copyright 2005, Fabio Bertagnin
7 * Copyright 2009-2010, Franck Villaume
8 * http://fusionforge.org
10 * This file is part of FusionForge.
12 * FusionForge is free software; you can redistribute it and/or modify
13 * it under the terms of the GNU General Public License as published
14 * by the Free Software Foundation; either version 2 of the License,
15 * or (at your option) any later version.
17 * FusionForge is distributed in the hope that it will be useful, but
18 * WITHOUT ANY WARRANTY; without even the implied warranty of
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
20 * General Public License for more details.
22 * You should have received a copy of the GNU General Public License
23 * along with FusionForge; if not, write to the Free Software
24 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
28 require dirname(__FILE__).'/../../../www/env.inc.php';
30 require_once $gfcommon.'docman/engine/parser_text.inc.php';
33 echo "Usage : parser_html.php <filename>\n";
38 if (!is_file($fichin))
41 $fd = fopen($fichin, "r");
42 $contents = fread($fd, filesize($fichin));
45 $strip_content = strip_tags($contents);
46 $filename = tempnam("/tmp", "tmp");
47 $fd = fopen($filename, "w");
48 fwrite($fd , $strip_content);
51 echo parser_text($filename);
56 // c-file-style: "bsd"