Codice PHP:
<?php
foreach(glob("*.html") as $file) {
   
   
$code file_get_contents($file);

   
$titolo '';
   
$descrizione '';

   if(
preg_match('@<title>([^<]*?)</title>@'$code$match)){
       
$titolo $match[1];
   }

   if(
preg_match('@<meta name="description" content="([^"]*?)">@'$code$match)){
       
$descrizione $match[1];
   }

   echo 
"$file : $titolo , $descrizione
"
;
}
?>