Php search engine for a site

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
wikipoemes
Forum Newbie
Posts: 1
Joined: Tue Sep 18, 2012 4:57 am

Php search engine for a site

Post by wikipoemes »

I have a French based language site: http://www.wikipoemes.com/ with articles on different categories.

I want to implement a simple php search engine for my website on pages like this on the top right corner:
http://www.wikipoemes.com/poemes/jacques-reda/index.php

Note: I keep all texts (title, body articles) on a mysql database.

Is there a possibility to integrate Google Site Search?

How can i do that?
I need some code suggestions, to make this script run fast.

Thanks all,
User avatar
social_experiment
DevNet Master
Posts: 2793
Joined: Sun Feb 15, 2009 11:08 am
Location: .za

Re: Php search engine for a site

Post by social_experiment »

http://www.javascriptkit.com/script/scr ... arch.shtml
take a look at the above url;

what is the structure of the database table? You might want to use 'tags' for the search. For example people will enter 'poem' and then you search the tag table for all tags titled 'poem'. These tags will be linked to another value; maybe a pagename or an article. A simplified table might look like this

tag | pagename
-----------------------------
poem | page1.php
stanza | page2.php
etc...
etc...
“Don’t worry if it doesn’t work right. If everything did, you’d be out of a job.” - Mosher’s Law of Software Engineering
Post Reply