Is this possible?

Discussion in 'PHP' started by Ernster, May 2, 2006.

  1. #1
    Hi there, unfortunately I am no programming whiz and desperately need some help for my new site.

    Is there a code/script available or is it atleast possible to have something where it counts how many times a word has been used on a page and than the percentage compared to other words used on the same page.

    For example:

    Blue (used 5 times) = 92%
    Red (used 2 times) = 6%
    Green (used 1 time) = 2%

    Thanks for your help.
     
    Ernster, May 2, 2006 IP
  2. Danny

    Danny Active Member

    Messages:
    732
    Likes Received:
    12
    Best Answers:
    0
    Trophy Points:
    78
    #2
    It is possible, but you would have to parse the text as a string and then do strpos or in string function with a count.

    php.net has a few examples of string functions in them that do exactly what you want. strpos is not the right one but I can not remember the correct function

    Once you have a count it is a simple compare and mathematical function to get the rest of the details
     
    Danny, May 2, 2006 IP
  3. Ernster

    Ernster Peon

    Messages:
    535
    Likes Received:
    38
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Thanks danny for your reply, unfortunately when I look at code I go blind or something lol. Do you know of any CHEAP but good programmers on the web where I could get them to develop me a script/database in mysql I guess? Somethig around the 100 - 150 US mark?
     
    Ernster, May 2, 2006 IP
  4. Danny

    Danny Active Member

    Messages:
    732
    Likes Received:
    12
    Best Answers:
    0
    Trophy Points:
    78
    #4
    Ernster check with Twistmyarm, I know he does some rent-a-coder stuff and is a very highly qualified developer.

    I simply don't have time or I would knock something together for you.

    It is a fairly simple piece of code even if your test is not yet in a database, it can still be parsed
     
    Danny, May 2, 2006 IP
  5. Ernster

    Ernster Peon

    Messages:
    535
    Likes Received:
    38
    Best Answers:
    0
    Trophy Points:
    0
    #5
    Thanks very much Danny, I PM'ed him so well see what he says:)
     
    Ernster, May 2, 2006 IP
  6. chandubhai

    chandubhai Banned

    Messages:
    556
    Likes Received:
    27
    Best Answers:
    0
    Trophy Points:
    0
    #6
    I have a similar script. else I can write one for you, quickly.
     
    chandubhai, May 2, 2006 IP