Looking for simple PHP script

Discussion in 'Programming' started by desimedia, Feb 6, 2008.

Thread Status:
Not open for further replies.
  1. #1
    I am looking for someone to code a script that will display random links.

    For example, when they load my page: www.mysite.com

    It will randomly take them to another site which is in my list.
    I would also like the script to maintain some simple stats on the number of times the sites have been loaded.

    pm me if you can do this
     
    desimedia, Feb 6, 2008 IP
  2. Jasperrr

    Jasperrr Peon

    Messages:
    545
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    0
    As Seller:
    100% - 0
    As Buyer:
    100% - 0
    #2
    I have send you a PM!
     
    Jasperrr, Feb 6, 2008 IP
  3. tures

    tures Peon

    Messages:
    172
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    As Seller:
    100% - 0
    As Buyer:
    100% - 0
    #3
    I could do this for you, PM me if interested, I don't want to flood your inbox :)
     
    tures, Feb 6, 2008 IP
  4. Twade Media

    Twade Media Banned

    Messages:
    39
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    43
    As Seller:
    100% - 0
    As Buyer:
    100% - 0
    #4
    I have PMed you also
     
    Twade Media, Feb 6, 2008 IP
  5. SNaRe

    SNaRe Well-Known Member

    Messages:
    1,132
    Likes Received:
    32
    Best Answers:
    0
    Trophy Points:
    165
    As Seller:
    100% - 0
    As Buyer:
    100% - 0
    #5
    If you still didn't deal with someone send me PM. I can do this for you
     
    SNaRe, Feb 6, 2008 IP
  6. Jasperrr

    Jasperrr Peon

    Messages:
    545
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    0
    As Seller:
    100% - 0
    As Buyer:
    100% - 0
    #6
    I have made the script for him + a extra statistics script + add url script.
     
    Jasperrr, Feb 7, 2008 IP
  7. corb

    corb Peon

    Messages:
    319
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    0
    As Seller:
    100% - 0
    As Buyer:
    100% - 0
    #7
    Same here buddy
     
    corb, Feb 7, 2008 IP
  8. Im The ONE

    Im The ONE Peon

    Messages:
    800
    Likes Received:
    40
    Best Answers:
    0
    Trophy Points:
    0
    As Seller:
    100% - 0
    As Buyer:
    100% - 0
    #8
    addurl.php
    
    <?php
    //add mysql connection etc here
    if(isset($_POST['submit'])) {
    mysql_query("INSERT INTO websites(url) VALUES('".$_POST['url']."')") or die(mysql_error());
    } else {
    ?>
    <form method="post">
    <input type="text" name="url" />
    <input type="submit" name="submit" />
    </form>
    <? }
    ?>
    
    PHP:
    index.php
    
    <?
    //mysql connection stuff
    $sql=mysql_query("SELECT url FROM websites ORDER BY RAND() LIMIT 1");
    $row=mysql_fetch_array($sql);
    header("Location: ".$row['url']."");
    ?>
    
    PHP:
    Hardly took me any time to code it ;)
     
    Im The ONE, Feb 7, 2008 IP
  9. tures

    tures Peon

    Messages:
    172
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    As Seller:
    100% - 0
    As Buyer:
    100% - 0
    #9
    You didn't add in tracking for impressions/clicks
     
    tures, Feb 7, 2008 IP
  10. brendandonhue

    brendandonhue Peon

    Messages:
    45
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    As Seller:
    100% - 0
    As Buyer:
    100% - 0
    #10
    And it's vulnerable to SQL injection attacks...
     
    brendandonhue, Feb 7, 2008 IP
  11. Jasperrr

    Jasperrr Peon

    Messages:
    545
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    0
    As Seller:
    100% - 0
    As Buyer:
    100% - 0
    #11
    Is it so hard to read the replies (4 in this case) before posting?


    QUOTE=Im The ONE;6458518]addurl.php
    
    <?php
    //add mysql connection etc here
    if(isset($_POST['submit'])) {
    mysql_query("INSERT INTO websites(url) VALUES('".$_POST['url']."')") or die(mysql_error());
    } else {
    ?>
    <form method="post">
    <input type="text" name="url" />
    <input type="submit" name="submit" />
    </form>
    <? }
    ?>
    
    PHP:
    index.php
    
    <?
    //mysql connection stuff
    $sql=mysql_query("SELECT url FROM websites ORDER BY RAND() LIMIT 1");
    $row=mysql_fetch_array($sql);
    header("Location: ".$row['url']."");
    ?>
    
    PHP:
    Hardly took me any time to code it ;)[/QUOTE]

    That's vulnerable for SQL injection and contains no stats for the clicking.
    Plus you would also need to setup a database for it, my script uses text files instead.
     
    Jasperrr, Feb 7, 2008 IP
  12. Im The ONE

    Im The ONE Peon

    Messages:
    800
    Likes Received:
    40
    Best Answers:
    0
    Trophy Points:
    0
    As Seller:
    100% - 0
    As Buyer:
    100% - 0
    #12
    'cause mine is free
     
    Im The ONE, Feb 8, 2008 IP
  13. Jasperrr

    Jasperrr Peon

    Messages:
    545
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    0
    As Seller:
    100% - 0
    As Buyer:
    100% - 0
    #13
    Then post it in the freebie section, this was a job with specific requirements.
     
    Jasperrr, Feb 8, 2008 IP
Thread Status:
Not open for further replies.