(.*?)<\/title>/is', $html, $title_match); $title = !empty($title_match[1]) ? trim($title_match[1]) : "Página sem título"; preg_match('/ $title, 'description' => $description, 'url' => $file, 'display_url' => str_replace('.html', '', $file) ]; } } // Ordenação A-Z usort($pages, function($a, $b) { return strcasecmp($a['title'], $b['title']); }); // 3. Salva o Cache (Usa Serialize - Nativo de qualquer PHP) if (!empty($pages)) { file_put_contents($cache_file, serialize($pages)); } } ?>

Nenhuma página encontrada.