Activity Stream
48,167 MEMBERS
6735 ONLINE
besthostingforums On YouTube Subscribe to our Newsletter besthostingforums On Twitter besthostingforums On Facebook besthostingforums On facebook groups

Results 1 to 8 of 8
  1.     
    #1
    Member
    Website's:
    ps3games.ORG

    Default [$10] Code this for me. (Pick number from txt file and display it on site)

    I need someone to code this for me.

    I want to upload a txt file to the root of my website. There will be roughly 40,000 lines of five digit numbers in that text file. The code I want developed will pick ONE number randomly out of that text file and display it on the users screen. I don't think this would be hard at all to do. But I want to be able to place the code anywhere in my wordpress templates and wherever I place it, the random-picked number will display.

    Please post here or PM me if you can do this, I will not pay upfront. I want this developed ASAP, but if you have any questions, please post here or PM me as well.

    Regards,
    -thizz
    thizzladen Reviewed by thizzladen on . [$10] Code this for me. (Pick number from txt file and display it on site) I need someone to code this for me. I want to upload a txt file to the root of my website. There will be roughly 40,000 lines of five digit numbers in that text file. The code I want developed will pick ONE number randomly out of that text file and display it on the users screen. I don't think this would be hard at all to do. But I want to be able to place the code anywhere in my wordpress templates and wherever I place it, the random-picked number will display. Please post here or PM me Rating: 5

  2.   Sponsored Links

  3.     
    #2
    Member
    Website's:
    wscripts.net damnlolscript.com lulzjet.com
    you will write those numbers?

    you can use mt_rand(10000,99999) if you want to show random numbers

  4.     
    #3
    Member
    Website's:
    EastsideHosting.com MediaONAIR.com ImgWiz.com cPadmin.net EastsidePCWorks.com HostedTalk.com
    First, Download and Install this plugin for WordPress;

    This will allow you execute php from posts, pages and widgets.

    Upload text file to a directory, such as;

    wp-content/uploads/list/
    However you plan to use this; posts, pages or widget; Go there and place this code.

    PHP Code: 
    <?php

    $file 
    "list.txt";

    $random file($file);
    echo 
    $random[array_rand($random)];

    ?>
    Make sure you, change:
    PHP Code: 
    $file "list.txt"
    to:

    PHP Code: 
    $file "wp-content/uploads/list/list.txt"
    or whatever the path is...
    EastsideHosting - (Web Hosting, Proxy Hosting, Reseller Program)
    MediaONAIR - (SHOUTcast Servers, ICEcast Servers, Reseller Program)
    Server Administrator - (Dedicated Servers, VPS Management, One Time Services)
    ImgWiz - (Free Image Hosting)

  5.     
    #4
    Member
    Website's:
    ps3games.ORG
    Wow, thanks Cory. Lemme try to see if that works.

  6.     
    #5
    Member
    Website's:
    ps3games.ORG
    Hey, bro. It works perfectly.

    I have one question, tho. How do I change the font size, type, etc.?

  7.     
    #6
    Member
    Website's:
    EastsideHosting.com MediaONAIR.com ImgWiz.com cPadmin.net EastsidePCWorks.com HostedTalk.com
    Just wrap this into a div or any html code;

    PHP Code: 
    echo $random[array_rand($random)]; 
    Example:

    PHP Code: 
    echo "<div class='define-class'>".$random[array_rand($random)]."</div>"
    or

    PHP Code: 
    echo "<div style='size: 14px; color: red;'>".$random[array_rand($random)]."</div>"
    To make it easier, we're going to make the echo a variable.

    PHP Code: 
    <?php

    $file 
    "list.txt";

    $random file($file);
    $genRandom $random[array_rand($random)];

    ?>
    Then;

    PHP Code: 
    echo "<div class='define-class'>$genRandom</div>"
    or

    PHP Code: 
    echo "<div style='size: 14px; color: red;'>$genRandom</div>"

    PHP Code: 
    <?php

    $file 
    "list.txt";

    $random file($file);
    $genRandom $random[array_rand($random)];

    echo 
    "<div class='define-class'>$genRandom</div>";
    ?>
    EastsideHosting - (Web Hosting, Proxy Hosting, Reseller Program)
    MediaONAIR - (SHOUTcast Servers, ICEcast Servers, Reseller Program)
    Server Administrator - (Dedicated Servers, VPS Management, One Time Services)
    ImgWiz - (Free Image Hosting)

  8.     
    #7
    Member
    Website's:
    ps3games.ORG
    Does anyone know how I would be able to do this in Javascript? I want to add the PHP code in a .js file and call it on my single.php in Wordpress, but when I add the code it doesn't work at all .

  9.     
    #8
    Member
    Website's:
    eih.bz pornDDL.me sexytattoochicks.tumblr.com
    Edit, nvm.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. My Pick For The Best File & Image Host
    By DJboutit in forum File Host Discussion
    Replies: 0
    Last Post: 23rd Sep 2012, 09:19 AM
  2. help me pick a new file host
    By byubi in forum File Host Discussion
    Replies: 1
    Last Post: 25th Apr 2011, 01:54 AM
  3. [Hiring] Just Post File Maker (Text file BB-Code) $3
    By elpirata in forum Completed Transactions
    Replies: 0
    Last Post: 11th Jan 2011, 06:46 PM
  4. Giving away domain - Pick number 1-30
    By CyberHacK in forum General Discussion
    Replies: 35
    Last Post: 8th Dec 2010, 09:30 PM
  5. Pick A Number And Win Anti-Virus
    By CyberAff in forum General Discussion
    Replies: 48
    Last Post: 28th Oct 2010, 05:28 PM

Tags for this Thread

BE SOCIAL