Quick mini PHP application needed

Discussion in 'Programming' started by Ithilnet, Jul 27, 2007.

  1. #1
    Hi, I need a very simple php script. Something doable in 3 minutes, I'm sure.

    Two forms. I input a keyword list in a txt file (uploaded on my website) and a URL. The application outputs an html code. See below:

    Input:

    http://website.com/

    keywords.txt containing:
    keyword one
    keyword two
    keyword three
    digital point
    digg
    server side
    kEyWoRd SeVeN

    Output:

    <a href="http://website.com/keyword+one">keyword one</a><a href="http://website.com/keyword+two">keyword two</a><a href="http://website.com/keyword+three">keyword three</a><a href="http://website.com/digital+point">digital point</a><a href="http://website.com/digg">digg</a><a href="http://website.com/server+side">server side</a><a href="http://website.com/kEyWoRd+SeVeN">kEyWoRd SeVeN</a>

    The script must respect capital letters and separate the words in the URL with the "+" sign.


    As mentioned above it is a really simple script.
    Post here or PM me your price. Need to be completed immediately, but hey, in two minutes you are done.
     
    Ithilnet, Jul 27, 2007 IP
  2. asgsoft

    asgsoft Well-Known Member

    Messages:
    1,737
    Likes Received:
    34
    Best Answers:
    0
    Trophy Points:
    160
    As Seller:
    100% - 2
    As Buyer:
    100% - 0
    #2
    Please see PM
     
    asgsoft, Jul 28, 2007 IP
  3. qprojects

    qprojects Peon

    Messages:
    1,901
    Likes Received:
    103
    Best Answers:
    0
    Trophy Points:
    0
    As Seller:
    100% - 0
    As Buyer:
    100% - 0
    #3
    I can make this, check my PM!
     
    qprojects, Jul 28, 2007 IP
  4. krt

    krt Well-Known Member

    Messages:
    829
    Likes Received:
    38
    Best Answers:
    0
    Trophy Points:
    120
    As Seller:
    100% - 0
    As Buyer:
    100% - 0
    #4
    <?php
    
    $fp = fopen('path/to/keywords.txt', 'r');
    
    while ($keyword = fgets($fp)) {
        if (!$keyword) continue;
        $path = str_replace(' ', '+', $keyword);
        echo "<a href=\"http://website.com/$path\">$keyword</a>";
    }
    
    ?>
    
    PHP:
    Doing this to help build up a rep here, so $2 ? Assuming it's not already done! :D
     
    krt, Jul 28, 2007 IP