Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search Web Site Script

Status
Not open for further replies.

nicsin

Programmer
Jul 31, 2003
743
0
0
GB
Hi all,

I am looking after script(s) to perform search in a web site. What I want to do is have the visitor enter a word and then bring up all the links in the web site that contain this word. Is it even possible? Can ti be platform independent?

Thnx for your input
 
You want to add a search facility to your site.

Easy, if you are able to use server-side scripting. Take a look at for lots of ready-made scripts.

If you're on a free host you probably won't be able to use CGI scripts, but there are remotely hosted services like Atomz.com and FreeFind.com that'll provide you with a search facility paid for either by you or by advertising. You can find a list of such services by following a link from the above URL.

I'm not sure what you mean by "platform independent" in this context. Which platfarm are you talking about, the client or the server?

-- Chris Hunt
 
nicsin,

My two cents...

Guess you're looking for a client side search script. Here's one of those (didn't test it, but I *think* it's what you're looking for):


However, doing a client side search requires the user's browser to in fact download (or at least *read*) the all searchable files. Hence, a much slower process than a server side script. Good for a limited number of pages on a non-server-side-able host, though.

Personally I would go for a PHP solution §;O)

Good Luck!


Jakob
 
I guess I wasn't clear enough! Yes I am looking for server-side script(s). when I say platform independent, I am refering to both windows and linux based servers. I will have a look at the side you suggested and post back my findings. Thanks for the help.
 
Hi Jakob,

I totaly agree with you and wouldn't go for a client-side script. I am therefore looking for asp, php etc
 
... or try asking in the PHP forum at this site : forum434


Jakob
 
JS all the way on this one, faq216-1332

[sub]Reality continues to ruin my life...[sub]
 
Thank you for that GUJUm0deL but as Chris suggests I would first look after a server-side script and if unsuccessful I would use a client-side one.

Chris and dkdude,

I tried a couple of scripts on the websites you suggested with no luck I must admit. They also returned irrelevant results... I will continue searching this evening and come back to post my findings.
 
Hi, I see no major advantage of using a server-side search engine then the client-side one, both instances will return (accurate) results...

Just out of curiousity, what server-side scripting can you use?? Can you use Coldfusion with MSAccess support?? If so, why not simply create a search engine script by scratch, which using CF would be like 100x simpler, and easy to set up also...

In CF all you do is create a dB with the appropriate fiels, like ID, keywords, links, description, then in the CFM pages just run a query that will take the the user-inputted value, match that against the dB and return the results, simple and clean...

Let me know if you need help with that, :)

[sub]Reality continues to ruin my life...[sub]
 
"I see no major advantage of using a server-side search engine then the client-side one"

To search all the pages of a site for a particular search term you either have to read each of them individually, or scan through some (likely very large) index file that you generate from them. If you're doing that client-side you've got to download a lot of stuff just to find (maybe) one or two pages.

Your script, as I understand it, works around this problem by requiring the webmaster to know in advance which words are going to be searched for and manually listing those words against each applicable page. That's a pretty tall order for a site with much real content, and a distinctly worse search experience for the user into the bargain as they have a good chance of not finding what they're looking for because they pick the wrong word.

Add to that the fact that some people surf with Javascript switched off altogether - for whom the search facility will not work at all - and you see why I think a Javascript search engine is the last resort. Remotely hosted solutions a free and easy to set up, but outside your control. Server-side solutions are freely available in whatever language you like - Perl, CF, PHP, etc. - and not too difficult to set up. There's no good reason to go for Javascript.

-- Chris Hunt
 
"Hi, I see no major advantage of using a server-side search engine then the client-side one, both instances will return (accurate) results..."

The major advantage is SPEED! Of course, the only way to do a server-side approach correctly is to find one of the programs that will index your site, so that the search entails only scanning one database rather than all the pages on a site.

To be cross-platform, you are sort of stuck with PHP. ASP will not run on Apache servers (well it will, if they are insane enough to allow such an insecure set-up on an obsolete version of Apache) and Perl is not the best solution for an IIS server, PHP is secure on both platforms, with only a few caveats when used with IIS. I woul heartily recommend pursuing PHP, there is a forum here and there are plenty of scripts available, too.

When in doubt, deny all terms and defnitions.
 
ASP will not run on Apache servers (well it will, if they are insane enough to allow such an insecure set-up on an obsolete version of Apache)

Where did you hear that crap from?

I would hardly call Apache 2.0.43 obsolete considering 2.0.48 is the current release version and 1.3.29 is still being maintained.



Wullie


The pessimist complains about the wind. The optimist expects it to change. The leader adjusts the sails. - John Maxwell
 
Hello Nicsin and all

Over the last few weeks I have been on a similar quest with the added requirement of the searched word being highlighted on the actual page. I've checked out dozens of possibilities and believe I've found the grail!

Go to and see how powerful and user-friendly Perlfect Search 3.31 is claimed to be. There are extensive help files and even a setup utility that will take care of copying everything in appropriate locations. You will need ssh/telnet access and I assume it will run on Apache servers (?).

I'm going to attempt setting it up on one of my clients sites next week. I'll let you know how it goes. If anyone has had bad experiences or reservations about it please let me know before I embarrass myself!

B.
 
"I would hardly call Apache 2.0.43 obsolete considering 2.0.48 is the current release version and 1.3.29 is still being maintained."

I was referring to Chillisoft, which, as I understand, does not run under current releases of Apache... you are probably referring to apache::asp which is actually perl, not pure asp.

It's not, in my opinion, a good solution... stick with PHP.

When in doubt, deny all terms and defnitions.
 
I was referring to Chillisoft, which, as I understand, does not run under current releases of Apache... you are probably referring to apache::asp which is actually perl, not pure asp.

I was actually referring to Chilisoft, which doesn't run under the very newest versions of Apache, but neither do a lot of modules. It takes time for a module to be updated to take into account new versions of Apache.


Platforms and Requirements

Web Servers

Java System Web Server 6
Apache Web Server 1.3.27 and 2.0.43


Current releases of Apache are:

1.3.29
2.0.48

Hope this helps

Wullie


The pessimist complains about the wind. The optimist expects it to change. The leader adjusts the sails. - John Maxwell
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top