barrycorrigan Posted August 9, 2011 Share Posted August 9, 2011 Hi Everyone, This site is always good for a bit of help and advice. I'm new to PHP and I am looking for some advice for the best way to get a PHP search on my client's website. I know there are some software packages out there at the minute e.g. http://www.sphider.eu/ http://www.wrensoft.com/zoom/index.html Basically What should I do, Should I go with one of these (maybe you know a better piece of software). Are there any good tutorials out there to code my own. Any Help would be great. Regards Barry Quote Link to comment https://forums.phpfreaks.com/topic/244304-help-and-advice-for-a-php-search-facility/ Share on other sites More sharing options...
TeNDoLLA Posted August 9, 2011 Share Posted August 9, 2011 What exactly you are trying to achieve? Quote Link to comment https://forums.phpfreaks.com/topic/244304-help-and-advice-for-a-php-search-facility/#findComment-1254873 Share on other sites More sharing options...
barrycorrigan Posted August 9, 2011 Author Share Posted August 9, 2011 Basically I would have a search box at the top of the website and any user can come and use the search box instead of navigating their way through the website Thanks for the reply Regards Barry Quote Link to comment https://forums.phpfreaks.com/topic/244304-help-and-advice-for-a-php-search-facility/#findComment-1254919 Share on other sites More sharing options...
the182guy Posted August 9, 2011 Share Posted August 9, 2011 Search facilities are entirely dependant on the way your content is stored. Do you store page content in the database or is it hard coded into scripts? A simple search function is easy to do with PHP if you're searching MySQL stored content, just use a LIKE query. Quote Link to comment https://forums.phpfreaks.com/topic/244304-help-and-advice-for-a-php-search-facility/#findComment-1254922 Share on other sites More sharing options...
barrycorrigan Posted August 9, 2011 Author Share Posted August 9, 2011 No there is no database or CMS being used. Does this make it harder... Quote Link to comment https://forums.phpfreaks.com/topic/244304-help-and-advice-for-a-php-search-facility/#findComment-1254990 Share on other sites More sharing options...
xyph Posted August 9, 2011 Share Posted August 9, 2011 Yes, much harder. Quote Link to comment https://forums.phpfreaks.com/topic/244304-help-and-advice-for-a-php-search-facility/#findComment-1255033 Share on other sites More sharing options...
the182guy Posted August 10, 2011 Share Posted August 10, 2011 There's a few ways to do that then. One is to create a db table that stores page file names and keywords that relate to the content. You could even store the actual content for a more comprehensive search. Other than that youll have to read the page files and look for the search term, you would need to exclude any php code whilst searching each page. Quote Link to comment https://forums.phpfreaks.com/topic/244304-help-and-advice-for-a-php-search-facility/#findComment-1255187 Share on other sites More sharing options...
Morg. Posted August 10, 2011 Share Posted August 10, 2011 Somehow, some people already do that and everyone knows them : google. In other words, if your pages are plain old static html that look the same on every load, you can simply insert a google search widget in your website and be done GL. Quote Link to comment https://forums.phpfreaks.com/topic/244304-help-and-advice-for-a-php-search-facility/#findComment-1255277 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.