similar threads/ related links how it is done

Discussion in 'PHP' started by roxy, May 5, 2006.

  1. #1
    Similar Threads / Related Links

    - You can see below in dp in any thread, how this is done.
    - I am sure it is not done in static way must be some interesting way.
    - If it is done on base of keywords , then how is importance of the keyword determined.
    - How are not related or common words eliminiated like , eg : how,is,the,a

    Thanks
     
    roxy, May 5, 2006 IP
  2. Edmunds

    Edmunds Peon

    Messages:
    136
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Simply take the whole post, or rather, thread title string, parse HTML, eliminate HTML tags using strip_tags(), then explode the string into seperate words using $words = explode(' ', $string); then cycle through the new $words array and check for common words, and count the number of duplicates. For the highest duplicates, just search for other threads like that.

    For a large forum, searching for other threads is done by making a search index.
     
    Edmunds, May 5, 2006 IP