$text = file_get_contents("http://urluno.com/"); $html = file_get_contents("http://urldos.com/"); similar_text($html, $text, $percentage); // Calculating ... echo $percentage;