PHP National Lottery script
I'm trying to write a script which creates national lottery numbers.
I need to make the script do these things.
each line needs to be unique.
Able to ignore numbers.
need to able to select 100 line of lottery.
only 4 numbers can match previous lines.
I have been working on this for few days now but i can't get it to ignore numbers and get unique numbers on each line.
My biggest problem is that i need to make sure the numbers are not repeated. each line can have 4 or numbers as before line or after line.
I don't know how picky you need to be about "random".
PHP doesn't really generate true random numbers.
Usually, it's not an issue ... but now you're talking about the lottery.
You can use a remote service like this to help make your script true random:
Here is their API: http://www.random.org/clients/http/
I imagine there are other services like this. I just picked this because
I've used it before. If randomness quality is not an issue, then nevermind.
|All times are GMT +1. The time now is 01:20 PM.|
Powered by vBulletin®
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.