kellz Posted November 18, 2007 Share Posted November 18, 2007 I saw lots of websites have the search thing that only searches their own website for keywords and I tried to make one, but, not to my surprise it didn't go as planned for long^^ How do the "real" search thingies work? like on this site ??? i want 1! Quote Link to comment Share on other sites More sharing options...
Distant_storm Posted November 18, 2007 Share Posted November 18, 2007 I believe they use CURL which is a networking tool which can search other webpages aswell as your own for text. hmm im not entirly sure there are many methods. Quote Link to comment Share on other sites More sharing options...
kellz Posted November 19, 2007 Author Share Posted November 19, 2007 I give up, and nobody knows how to do it (unless of course it's some kind of big secret) Quote Link to comment Share on other sites More sharing options...
teng84 Posted November 19, 2007 Share Posted November 19, 2007 you mean like the search menu on the right upper portion of this board? Quote Link to comment Share on other sites More sharing options...
kratsg Posted November 19, 2007 Share Posted November 19, 2007 I believe Google has their own free script that you can use, embed a google search inside your site, and it can search your site as well as google... :-o That may make it easier. Quote Link to comment Share on other sites More sharing options...
kellz Posted November 19, 2007 Author Share Posted November 19, 2007 I want to make 1 not use someone elses, I just dont know how and there is no instructions or advise or anything about it... And yes at teng84 Quote Link to comment Share on other sites More sharing options...
cooldude832 Posted November 19, 2007 Share Posted November 19, 2007 you would have to redesign your cms or apply additional steps. if your cms stores all the content in a databasing of some sort you can use a query with the "like" type to get what you want. If you cms does not store your data like so you will need to self index your pages exactly like google does and then use those indexes as your search pool. It can be done, but if you don't have a strong cms behind it forget it cause selfindexing your site is difficult. Quote Link to comment Share on other sites More sharing options...
teng84 Posted November 19, 2007 Share Posted November 19, 2007 i guess that goes this way.. sample you use this key words $yourquery = 'select * from table where 1=1 '; $var = trim('am i teng'); $array = explode($var); $srch = ''; foreach($array as $val){ $srch .= " OR yourfieldhere like '%".$val."%'"; } if ($srch != $srch){ mysql_query ($yourquery.$srch);//do other stuff here } else{ //some stuff here } simple but should give an idea ! Quote Link to comment Share on other sites More sharing options...
Distant_storm Posted November 19, 2007 Share Posted November 19, 2007 Yes I think the most simple but causes alot more data storage is keywords as said above. example... 1.Create database table called keywords_search_site create fields as follows ID keyword description link 2. create the form for searching 3. Create the processing code for the search which should break up the search words into an array and search the database for each word of the array. 4. Show the results on screen as... Description and then a link to the page which holds what they looked for. Hope that helps the theory side of it. If you want any code mucking up just ask. Regards Distant Storm Quote Link to comment 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.