1000000 ) { $logs["default"][] = "Non standart file $name"; continue; } $mime_type = mime_content_type($name); switch($mime_type) { case "image/jpg": case "image/jpeg": $img = imagecreatefromjpeg($name); imageinterlace($img, 0); break; case "image/png": $img = imagecreatefrompng($name); imageinterlace($img, 0); break; case "image/gif": if(function_exists("imagecreatefromgif")) { $img = imagecreatefromgif($name); imageinterlace($img, 0); } else { $img = false; } break; case "application/x-gzip": break; case "text/html": case "text/plain": case "text/x-php": if( strpos($name, '.html') !== false ) { if( strpos(file_get_contents("$name"), " $data ) { echo "logtype: {$type} \n"; foreach( $data as $line ) { echo "{$line} \n"; } echo "\n"; } }