Hi, I'm building a website that needs search functions that only correspond to the items on the website itself. What's the script (or scripts) necessary for it?
Printable View
Hi, I'm building a website that needs search functions that only correspond to the items on the website itself. What's the script (or scripts) necessary for it?
are the "items on the website itself" in a database, or on a bunch of different files (or both)?
If you can run queries on mysql to search it'll be fast and easy. If your search function must visit all the web-pages to get the data then... it's complicated. You'll have to cache the site every so often and put the content in a database- organized by web-page and hierarchy- and yeh.. Well you don't -have- to do it that way, but I would.. Obviously two or more programs can do the same thing and work differently.. You're not going to get it efficient enough without server-side caching unless each of your web-pages are static and you scan them server-side. Whether you cache to a mysql database or something else doesn't really matter- it's up to your preference.
Or search google and leach a script like everyone else does :/
Which reminds me.. Google has a search bar they'll happily let you use- and they (most likely) already cached your site on their server, FYI.
It's both. I tried googling scripts but I've been googling for days and fonud nothing. :/
Sometimes you need to think -inside- the box.
Google Custom Search - Site search and more