Need a Simple? Script

Discussion in 'Programming' started by john_80, Aug 7, 2008.

  1. #1
    Hello,

    I need a script which :

    - Would show random number from 50-300 depends on time .
    - would change very 2-3 min.
    e.g. :

    if we have 01 AM then there will be 55
    if 3PM then 276
    if 8PM then 189

    and it need to change every few min.

    Cheers
     
    john_80, Aug 7, 2008 IP
  2. cywong

    cywong Peon

    Messages:
    50
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    As Seller:
    100% - 0
    As Buyer:
    100% - 0
    #2
    what kind of script do you want? a PHP or what :confused:
     
    cywong, Aug 7, 2008 IP
  3. john_80

    john_80 Well-Known Member

    Messages:
    540
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    120
    As Seller:
    100% - 0
    As Buyer:
    100% - 0
    #3
    yeah ... I am not familliar with scripts or sth.. I need to put it to my website so php/java?
     
    john_80, Aug 7, 2008 IP
  4. AdnanAhsan

    AdnanAhsan Well-Known Member

    Messages:
    601
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    110
    As Seller:
    100% - 0
    As Buyer:
    100% - 0
    #4
    i didn't get you buddy, do you want random number after every 2 or 3 minutes? or what?
     
    AdnanAhsan, Aug 7, 2008 IP
  5. NetworkTown.Net

    NetworkTown.Net Well-Known Member

    Messages:
    2,022
    Likes Received:
    28
    Best Answers:
    0
    Trophy Points:
    165
    As Seller:
    100% - 0
    As Buyer:
    100% - 0
    #5
    Please PM me and explain a bit more detail if you can and then i will be able to do this for you.
     
    NetworkTown.Net, Aug 7, 2008 IP
  6. one2three

    one2three Banned

    Messages:
    227
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    0
    As Seller:
    100% - 0
    As Buyer:
    100% - 0
    #6
    Hi

    When you say you need a random number that would mean that at 3PM the number could be anywhere between 50-300.

    In your example you said

    if 3PM then 276
    if 8PM then 189

    Does that mean at 3PM you wan't it to show 276... or do you mean it could be any number such as 68,125,234 and so on....

    If its just any random number, contact me and I can do it for free as its a very very simple script.

    Thanks, Tom
     
    one2three, Aug 7, 2008 IP
  7. Shoro

    Shoro Peon

    Messages:
    143
    Likes Received:
    8
    Best Answers:
    0
    Trophy Points:
    0
    As Seller:
    100% - 0
    As Buyer:
    100% - 0
    #7
    From what it sounds like, what you're asking for is a pretty simple script.

    
    $fname = "storefile.txt";
    $minute = date("i");
    if (file_exists($fname)) {
        $datastr = file_get_contents($fname);
        $datarr = explode(",",$datastr);
        $mincheck = $datarr[0] + 2;
        if ($minute > $mincheck) {
            $newnum = rand(50,300);
            $handle = fopen($fname,"w");
            fwrite($handle,"$minute,$newnum");
            fclose($handle);
            echo $newnum;
        }
        else {
            echo $datarr[1];
        }
    }
    else {
        $newnum = rand(50,300);
        $handle = fopen($fname,"x");
        fwrite($handle,"$minute,$newnum");
        fclose($handle);
        echo $newnum;
    }
    PHP:
    Can be made even simpler if your webhost allows you to use the alternative PHP cache.
     
    Shoro, Aug 7, 2008 IP
  8. john_80

    john_80 Well-Known Member

    Messages:
    540
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    120
    As Seller:
    100% - 0
    As Buyer:
    100% - 0
    #8
    hm... thanks for the pms but :

    yeah I also do not know if you get me :

    I want script as I posted and number should change every 2-3 min , depends on hour it should be less range of numbers let me show you :


    script should change numbers like that :

    time [ in h.] | range

    egzample :

    00-01 | 50-100 - At 00:25 there will be 88

    00-01 | 50-100
    01-04 | 100-200
    04-05 | 100-300
    05-06 | 100-150
    06-07 | 50-100
    07-08 | 100-200
    08-09 | 100-200
    09-10 | 100-300
    10-20 | 100-300
    20-24 | 50-200

    ------------

    Numbers should change every 5min.(meby it will be easier to set up 1 number than a 3-5 ;) ) randomly for a few points up and down [ in 5-20 range ]

    egzample :

    We have a 00h so we have >>> 00-01 | 50-100<<<

    00:05 - 63
    00:12 - 57
    00:18 - 75
    00:27 - 66
    00:30 - 49
    00:35 - 69
    00:41 - 85

    and so on..


    -----

    My server has a php so it shouldn't be any problem with your script I guess.

    ---

    Please do not pm with price like 100$ coz I do not want to pay so much for such script.


    Leave your qestions if you still have any :)
     
    john_80, Aug 8, 2008 IP
  9. john_80

    john_80 Well-Known Member

    Messages:
    540
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    120
    As Seller:
    100% - 0
    As Buyer:
    100% - 0
    #9
    anyone interested exactly in this kind of script ?
     
    john_80, Aug 9, 2008 IP
  10. jetblack

    jetblack Active Member

    Messages:
    93
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    95
    As Seller:
    100% - 0
    As Buyer:
    100% - 0
    #10
    I've sent you PM.

    Regards
     
    jetblack, Aug 9, 2008 IP
  11. doro

    doro Active Member

    Messages:
    306
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    58
    As Seller:
    100% - 0
    As Buyer:
    100% - 0
    #11
    I'll do it fast and good, just PM for a price. Also check my feedback score :)
     
    doro, Aug 11, 2008 IP
  12. technojuice

    technojuice Peon

    Messages:
    207
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    As Seller:
    100% - 0
    As Buyer:
    100% - 0
    #12
    Script sent !
     
    technojuice, Aug 12, 2008 IP
  13. john_80

    john_80 Well-Known Member

    Messages:
    540
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    120
    As Seller:
    100% - 0
    As Buyer:
    100% - 0
    #13
    Payment also sent !
    recommended!

    A++++

    mods@ u can close this thead now.
     
    john_80, Aug 13, 2008 IP