<?php
$dosyalar = glob("*");
for($i=0;$i<count($dosyalar);$i++) {

$url = "http://www.sitem.com/klasor/".$dosyalar[$i];
$file = file_get_contents($url) or $d = 1; // buraya kodları hangi sayfadan çekeceğini yazıyorsun . 
if ($d) { echo "error";} 
else { 
$cek = explode("<title>",$file); 
$cek = explode("</title>",$cek[1]); 
$cektim = trim($cek[0]); 
}
echo "<a href=\"http://www.sitem.com/klasor/".$dosyalar[$i]."\">".$cektim."</a><br />";
}
?>