I would recommend caching the results of those multiple file reads (of course discarding words like the, and, is, a, etc and all html and none text sections). The preference would be to use a database since %like% searches are relatively easy to execute and usually sufficient.
You should have posted this in the PHP forum, since it doesn't really have anything to do with HTML.
I would suggest that you start learning some PHP. Try starting with the tutorials on PHP and SQL at http://w3schools.com/. I've found them to be a good jumping off point. Once you have a better grasp of PHP, it shouldn't be too difficult to create a search script.
Alternatively you could use Google's custom search, which allows you to make use of Google's search engine that will only search your website, and you can embed a search box on your site.
You should have posted this in the PHP forum, since it doesn't really have anything to do with HTML.
soz, the google standard search box wants you to post ads on your website, which my clients does not want, and they dont wanna pay extra for a search box.
thanks, gonna dig into php code, deadline approaching fast
Create a folder in your root directory that contains all the contents of each page, e.g: about.txt, contact.php etc. NO coding, just plain text content.
<span style="font-size:18px;">Search results for <span style="color:#01a4a6;">"<?=$user_input;?>"</span></span><br/><br/>
<?
if(count($found) == 0)
{?>
No results found
<?}
else{
foreach($found as $i => $v)
echo "<a href='".$index[$v][0]."'>".$index[$v][1]."</a><br/>";
}
}
else{?>
Please enter text in the search box and press enter
<?}?>
i already create in-house HTML that only can be use at my office & cannot be view from external. my HTML page already publish. my problem, my search button not function, i not using database this HTML site only for internal.
Kindly advise
Bookmarks