Показать сообщение отдельно

  #1  
Старый 19.03.2009, 14:59
Pashkela
Динозавр
Регистрация: 10.01.2008
Сообщений: 2,841
С нами: 9649706

Репутация: 3338


По умолчанию

2 shpak1:

PHP код:
<?php  

@set_time_limit(0); 
@
ini_set("display_errors","1");

function 
check($str) {
 
$arr = array ('remixlang','remixchk','remixmid','remixemail','remixpass','remixsid','remixclosed_tabs');
 if( 
in_array($str,$arr)) return true;
 else return 
false;



function 
ListDir($path) {
    
$path = (substr($path,-1)=='/') ? $path:$path.'/';
    
$dh  opendir($path);
    while ( (
$item readdir($dh) ) !== false) {
        
$item $path.$item;
        if ( (
basename($item) == "..") || (basename($item) == ".") )
            continue;
        
$type filetype($item);
        if (
$type == "dir")
            
ListDir($item);
        else
            
$dir[]=$item;
    }
    
closedir($dh);
        return 
$dir;
}
$a ListDir('/home/bla-bla/bla-bla/http/s11/'); // Полный абсолютный путь до директории с куками
$count count($a);
$buffer='';
$file fopen('result.txt','a');
for (
$i=0;$i<$count;$i++) {
  
$handl fopen($a[$i],'r');
  while (!
feof($handl)) {
    
$buffer trim(fgets($handl));
    if(
check($buffer)) {
       
fwrite($file,$buffer ."=");
       
$buffer trim(fgets($handl));
       
fwrite($file,$buffer.";");
    } 

  }
fclose($handl);
fwrite($file,"\r\n");
}
fclose($file);
echo 
'All results was saved in result.txt';
?>

Последний раз редактировалось Pashkela; 19.03.2009 в 15:07..
 
Ответить с цитированием