Always on number generator

Discussion in 'PHP' started by Jeremy1026, Jul 19, 2010.

  1. #1
    I'm not sure if this is the right place to put this, mainly because I am not sure what language I need to use, or if its even possible.

    I am writing an application to allow multiple users to play bingo over the internet. I need to make a way to keep calling new numbers, but I have no idea how to do it. I would like to draw random numbers and store them in an MySQL database, but have no idea how I can make the numbers call 24/7. Any ideas would be greatly appreciated.
     
    Jeremy1026, Jul 19, 2010 IP
  2. savageman123

    savageman123 Peon

    Messages:
    46
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    In php you can use mt_rand(1,10) to generate a number between 1-10.

    The numbers will not be truely random but unless you are planning on running real money games this is more than enough.

    I would have to say generating then storing a random number in a database table to retrieve later is overly complex for no reason.

    If you are interested in generating numbers with true randomness, google "generate true random numbers".
     
    savageman123, Jul 19, 2010 IP
  3. Jeremy1026

    Jeremy1026 Peon

    Messages:
    4
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    That would require the page to be manually refreshed though, correct? I would prefer to make it so the numbers are called non-stop. So that the games will play forever and ever.
     
    Jeremy1026, Jul 19, 2010 IP
  4. MyVodaFone

    MyVodaFone Well-Known Member

    Messages:
    1,048
    Likes Received:
    42
    Best Answers:
    10
    Trophy Points:
    195
    #4
    MyVodaFone, Jul 19, 2010 IP