I've got two fairly large HTML files I'm trying to figure out how similar they are. The similar_text() command works great on small snippets of text, but it stalls out on large files. Is there a better way to do this? Thanks!
<?php
// Load 1st file
$myfile "http://mywebsite.com/php/1stfile.htm";
$first_page = @implode("",file($myfile));
// Load 2nd file
$myfile2 =
"http://mywebsite.com/php/2ndfile.htm";
$second_word = @implode("",file($myfile2));
// Compare similarity
$i = similar_text($first_word, $second_word, &$p);
// Report results
echo("Matched: $i Percentage: $p%");