![]() |
|
#1
|
|||
|
|||
simple fake searchI'm currently working with a friend on a website..just doing the small things. One of the things he asked me to do was to create a search engine for the site. Now he currently wants to change the setup of his site (html docs to php cms) so I couldn't just use a meta tag search, so I decided to make one myself to use just for the meantime. It's a script that fakes searching the site.
Basically you specify the url, title, description and keywords in a multi-dimensional array. The searched words are then compared to the entires in the array and returns the url, title and description of the found entries. goto www.exzibit.co.za to view the script in action. Search for 'products' and 'home' to view the script retrieving more than one entry. Heres da code: PHP Code:
So what ya think of my methods? Any comments, suggestions are most welcome. I just did this today there's still a lot of tweaking I gotta do.. Thanx in advance Rich |
|||
|
#2
|
||||
|
||||
|
Must be a lot of work but it might work (if your intention is to fake it)!
One quick comment I have is for you to look into using the ARRAY functions, specifically the in_array() function in your example code above. __________________
J de Silva Learning Journal | GIDForums™ | GIDNetwork™ | GIDWebhosts™ | GIDSearch™ |
|
#3
|
|||
|
|||
|
Well that's basically it. All I gotta do now is add more keywords and pages in the array. I guess I will be able to use this code for full text searching. Just gotta add the contents of the files or records searched into the array.
Quote:
|
Recent GIDBlog
Once again, no time for hobbies by crystalattice
| Thread Tools | Search this Thread |
| Rate This Thread | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| database search | skyloon | MySQL / PHP Forum | 6 | 04-Jun-2006 13:09 |
| Using meta tags help in ranking on some search engine | pcx | Search Engine Optimization Forum | 8 | 29-Mar-2005 16:42 |
| Search Engine Positioning 101 and 201 "How To" Tips... | 000 | Search Engine Optimization Forum | 0 | 29-May-2003 11:34 |
| [class] 404 search function code | jrobbio | MySQL / PHP Forum | 6 | 22-Apr-2003 10:32 |
| Generating simple URLs for search engines | jrobbio | MySQL / PHP Forum | 1 | 17-Mar-2003 12:22 |
Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The