What are some alternative search options for a website that only searches linked pages?

When a website only searches linked pages, it limits the scope of search results to only those pages that are directly linked within the site. To expand search capabilities to include all pages on the website, you can implement a custom search function that crawls through all linked pages and indexes their content for search queries.

// Function to crawl through linked pages and search for keyword
function custom_search($keyword) {
    $search_results = array();
    
    // Code to crawl through linked pages and search for keyword
    
    return $search_results;
}

// Example usage
$keyword = "example";
$results = custom_search($keyword);
print_r($results);