IamBanksy
IamBanksy

Reputation: 591

PHP - create a search on a static site

I have a site which does not have a DB in the back-end but one day could possibly have one. I currently need the capability to search my existing site from the homepage. My first question is it a good idea to search a site consisting of only static pages?

I was hoping to somehow leverage google for this so I do not have to write my own algorithm or anything. The site is completely indexed by google so I figured this would suffice for the time being. I would like to have the results from google search rendered back on to my templated page. Again is this possible and is this a good idea?

Any advice would be great. I know that it seems redundant to search a site with now DB but my user base might not be very computer savy and anything that will help them get the information they need is a plus. Thanks for any advice.

Upvotes: 1

Views: 667

Answers (3)

Joe Martinez
Joe Martinez

Reputation: 854

I wrote about this a while back for Jekyll generated static sites. You could try this

Upvotes: 1

Roberto Aloi
Roberto Aloi

Reputation: 30985

I would suggest you to go for a Google Custom Search:

http://www.google.com/cse/

Upvotes: 2

Sarfraz
Sarfraz

Reputation: 382608

The easiest option that comes to mind is to implement the Google Search for your site.

Upvotes: 5

Related Questions