Forum Post
Index > Website > New Search Feature

Author/Date New Search Feature
fReT
05/04/2002 4:08am
I implemented a simple search function today. It's a little basic for my liking but it seems to work ok.

The problem is sorting the cruft from the actual words. For instance I can pull the pages through the webserver to remove all the PHP code, and but I still have all the HTML there, which shows up in the searchable text. It'd be nice to strip all the HTML tags out and get raw text... no code, no HTML... but thats a lot of work. I don't want to write a HTML tag striper in PHP just yet.

Anyways enjoy.
fReT
07/04/2002 8:40pm
I've added a date field to the search.

You can check on the recent forum posts that way, although it will return documents changed after the date as well.

Neato.
Now back to C++ me thinks.
fReT
08/04/2002 8:33am
And now the date search returns downloads that have been released after the specified date.

Don't know how useful that is but hey what the heck... it's geeky.
Andreas
09/05/2002 7:25pm
To strip the HTML tags, why not use PHP function strip_tags?

You could also use something like:
ereg_replace('<([^>]|\n)*>', '', $string);

If tags spill over multiple lines, you should do something like this:
$file_text = strip_tags(join('',file($filename)))
Reply