How do you creating Search Engine in PHP site

 
Post new topic   Reply to topic    34SP.com Forum Index // Web Design
View previous topic :: View next topic  
Author Message
simonmlewis
34SP Newbie
34SP Newbie


Joined: 24 Feb 2003
Posts: 70
Location: Lincolnshire

PostPosted: Tue Jun 10, 2008 9:59 pm    Post subject: How do you creating Search Engine in PHP site Reply with quote
Hi all

I want to create a simple search box on a PHP site (that doesn't use a Database as the content management). When someone searches for something within the site, it brings up the various pages where the result has been found.

How do I do this?
I've seen various software downloads, most of which run it with MySQL.

Is there a better way, or if the software is the software is the best option, which is free and easiest to operate?

Thanks
Simon
_________________
Simon ML
Back to top
View user's profile Send private message Visit poster's website
philr
Super Member
Super Member


Joined: 05 Nov 2003
Posts: 990
Location: Exeter

PostPosted: Wed Jun 11, 2008 3:13 pm    Post subject: Reply with quote
In my experience, most of these PHP/MySQL search tools don't produce very good results, and the ones that do tend to be rather complicated to use. For example, this forum's search page has a bunch of options and instructions that you have to read first. Visitors will find it a bit annoying if they have to pick their way through a load of instructions before they can use your site.

Also, since you're not using a CMS, your search tool won't have any idea how often your web pages are accessed, so it won't be able to sort the results based on their popularity. Google uses PageRank to find the pages that people are most interested in, so it gives much better results.

My advice would be to use Google's sitesearch feature instead. Even my mother knows how to work Google. Just add this to your HTML pages (replacing "yoursite.example.com" with your domain name and "UTF-8" with whatever character encoding you're using):

Code:
<form method="get" action="http://www.google.com/search">
<p>Google this site:<input type="hidden" name="ie" value="UTF-8" />
<input type="hidden" name="oe" value="UTF-8" />
<input type="text" name="q" size="14" maxlength="255" />
<input type="submit" name="btnG" value="Go" />
<input type="hidden" name="sitesearch" value="yoursite.example.com" /></p>
</form>

_________________
Phil Ronan
フィリップ・ローナン
Back to top
View user's profile Send private message Visit poster's website
simonmlewis
34SP Newbie
34SP Newbie


Joined: 24 Feb 2003
Posts: 70
Location: Lincolnshire

PostPosted: Wed Jun 11, 2008 5:14 pm    Post subject: Reply with quote
Hi.
Yes I have used this method before, and it's dead easy.
But - this site is for a corporate Solicitors firm, and they wish to keep their branding on the results page. The search page itself is simple to edit, but not results, as that's is literally Google's site, so the navigation is taken away.

I would suggest it be done *with* Google but have the links go back to the parent page, but since i cannot control the links within Google, that's not possible.

Really want to be able to supply the results in the lower include page, so it stays part of the site.

Simon
_________________
Simon ML
Back to top
View user's profile Send private message Visit poster's website
philr
Super Member
Super Member


Joined: 05 Nov 2003
Posts: 990
Location: Exeter

PostPosted: Wed Jun 11, 2008 6:20 pm    Post subject: Reply with quote
Then how about using the Google AJAX Search API?
_________________
Phil Ronan
フィリップ・ローナン
Back to top
View user's profile Send private message Visit poster's website
simonmlewis
34SP Newbie
34SP Newbie


Joined: 24 Feb 2003
Posts: 70
Location: Lincolnshire

PostPosted: Wed Jun 11, 2008 6:45 pm    Post subject: Reply with quote
Fantastic, certainly sounds like what I could use.

Cannot implement just yet, but do you know how it works?
Can the results be customized with DIVs etc? OR is it literally an iframe type box I place in an Include?

Cheers.
_________________
Simon ML
Back to top
View user's profile Send private message Visit poster's website
trev
Junior Member
Junior Member


Joined: 15 Aug 2001
Posts: 112
Location: Southampton

PostPosted: Fri Jun 13, 2008 10:14 am    Post subject: Reply with quote
If your site is fairly static (ie. content is only changed every month or so) then you could use something like Zoom Indexer:
http://www.wrensoft.com/zoom/
The nice thing about it is that it can search into pdf's, doc's and media files. The results can be displayed in Google fashion with suggested search words if the user gets the spelling wrong. The downside is that you might need to rebuild the indexes each time a change is made to the site.
It's not free but worth the money.
Back to top
View user's profile Send private message
simonmlewis
34SP Newbie
34SP Newbie


Joined: 24 Feb 2003
Posts: 70
Location: Lincolnshire

PostPosted: Fri Jun 13, 2008 11:13 am    Post subject: Reply with quote
Very useful too, but wouldn't this have to be installed on the 34sp web server to run for my site?
_________________
Simon ML
Back to top
View user's profile Send private message Visit poster's website
trev
Junior Member
Junior Member


Joined: 15 Aug 2001
Posts: 112
Location: Southampton

PostPosted: Mon Jun 23, 2008 7:40 pm    Post subject: Reply with quote
Sorry for delayed reply, been on hols!

You can index the site remotely and just upload the indexes so no need to install on 34sp. I used it on a site where there was a members only area and I was able to just index the members folders and provide them with a search page.
Back to top
View user's profile Send private message
Post new topic   Reply to topic    34SP.com Forum Index // Web Design All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Powered by phpBB © 2001, 2002 phpBB Group