<?php $d='du/'; $da=scandir($d); $ar=array(); if(isset($_GET['u'])) include "no/ga.php"; foreach($da as $str) { if(is_file($d.$str) && substr($str,-1)=='t' && preg_match_all('/\/([B-W]\S{10})/',join(' ',file($d.$str)),$res)){ $ar[]=substr($str,1,4); $ar=array_merge($ar,$res[1]); } } echo count($ar).' '; $ar=array_unique($ar); echo count($ar)."\n"; echo join("\n",$ar);