Display random image by relevance

Discussion in 'Programming' started by laffin, Sep 17, 2008.

  1. #1
    Hello,

    I need some help to find a script to show me a random picture from a specific folder by relevance of my post.

    I mean, if i have a post "Russia attack Georgia" to display picture from a specific folder for example russia-0001.jpg.

    Thank you!
     
    laffin, Sep 17, 2008 IP
  2. artur81_skce

    artur81_skce Peon

    Messages:
    5
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    HELLO.
    try to use explode() to extract all words from sentence.
    Then compare each (word) element of array with name of file.
    I don't have a script, only solution.
    Thanks, Artur
     
    artur81_skce, Sep 17, 2008 IP
  3. laffin

    laffin Peon

    Messages:
    49
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Hello artur81_skce,

    Thank you for your solution, but you can give me just a example how to compare each (word) element of array with name of file ?

    Thank you!
     
    laffin, Sep 17, 2008 IP
  4. jimrthy

    jimrthy Guest

    Messages:
    283
    Likes Received:
    13
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Good luck with this. This is the kind of problem that google has teams of PhD's spending years on.
     
    jimrthy, Sep 17, 2008 IP
  5. laffin

    laffin Peon

    Messages:
    49
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #5
    i`ll try... thank you! :)
     
    laffin, Sep 17, 2008 IP