Example #1
0
                    echo "<b><a href=\"ArAutoSummarize.php?file=$file&rate=$rate\">";
                    echo "$file</a>:</b><br />$summary<hr>";
                }
            }
            closedir($dhandle);
        }
    }else{
        $file = $_GET['file'];
        $rate = $_GET['rate'];
    
        // get contents of a file into a string
        $fhandle = fopen($dir.$file, "r");
        $contents = fread($fhandle, filesize($dir.$file));
        fclose($fhandle);
    
        $highlighted = $Arabic->highlightRateSummary($contents, $rate, $_GET['q'], 'summary');
        $metaKeywords = $Arabic->getMetaKeywords($contents, $rate);

        echo "<b>$file:</b><br />$metaKeywords<hr />$highlighted<br /><br />";
        echo "<a href=\"ArAutoSummarize.php?rate=$rate\">Back</a>";
    }
?>
</div><br />
<div class="Paragraph">
<h2>Example Code:</h2>
<?php
highlight_string(<<<'END'
<?php
    include('../Arabic.php');
    $Arabic = new Arabic('ArAutoSummarize');
    $Arabic->setInputCharset('windows-1256');