PDA

View Full Version : php search engine


Billy T
07-06-2003, 09:53 AM
Hey all

anyone got a php search engine script?

My aim is to allow people to search the site for keywords. Would be nice if it scanned a folder or something to find all the pages it needs to scan. Obviously, it then needs to return the results with links to the relevant pages

Thanks in advance

vosgien
07-06-2003, 04:47 PM
Hi Billy,
I found an article at devShed that shows how to build a search engine using php and ht://Dig - not certain it is what you need, but take a look anyway, link is :
http://www.devshed.com/Server_Side/PHP/Search_This/page1.html
if link doesn't work, feel sure you know your way to devShed !

Vosgien

p.s. thanks for the response on the other thread, it didn't solve the prob, but helped towards it !

Billy T
07-07-2003, 12:29 AM
looks interesting

Thanks

freddycodes
07-07-2003, 06:13 AM
htdig is nice, it indexes the files for easier searching, but it requires software to be installed on a server, and configuration of that server. Could be problems on shared hosting accounts.

Billy T
07-07-2003, 06:17 AM
sure ok

yeah the one I'm implementing will be pretty simple...working quite well so far though...

Thanks

freddycodes
07-07-2003, 06:20 AM
Billy are you writing one yourself?

Billy T
07-07-2003, 06:24 AM
yeah but like I said - very very simple ;)

will no doubts have some questions for you soon :)

freddycodes
07-07-2003, 06:27 AM
Fire away.;)

freddycodes
07-07-2003, 06:30 AM
You might want to have a gander in here first though.
http://www.hotscripts.com/PHP/Scripts_and_Programs/Search_Engines/index.html

Billy T
07-07-2003, 06:51 AM
fire away? ok you asked for it ;)

you can see the rough page here - http://billyt.homeip.net:81/james/main.php?page=home

if you click on a few links you'll see that they all load main.php and then include a certain php file (for the content in the white area) that it gets from the query string

Now, at the moment I have my search stuff in another file. This will gather the info and I guess store it all in an array. What is the best way to then go back to something like main.php?page=displayResults and send it the info in the array?

Should I set up a session?

Thanks ;)

Billy T
07-07-2003, 01:50 PM
nevermind

I think I got it sorted (probably very messy but it seems to be working)

Thanks anyway