Main Menu

HOME

.Net
ASP
Assembly
C
C++
Delphi
HTML
Java
JavaScript
MySQL
PC interface
Powershell
Perl
PHP
VBScript
Visual Basic
XML

Make money selling software. Check this out here

Hosted clickbank mall. Check this out here




   Misc

   Amazon

   Links

    


Lottery numbers

 

Lottery numbers

 

<?
//function to return lottery numbers for your lottery
//written by laney (laney@lan3y.com)
//usage: lottery(maximum ball number, number of balls dropped);
//example: echo lottery('5000','200');
//lottery() will generate numbers for british lottery

function lottery($maxn = "49",$maxb="6") {
srand((double) microtime() * 1000000);

while (1>0) {
$lottery[] = rand(1,$maxn);
$lottery = array_unique($lottery);
if (sizeof($lottery) == $maxb) break;
}
sort($lottery);
return implode(", ",$lottery);
}
$lotterynums = lottery();
?>
<html>
<head>
<title>Lottery Numbers</title>
</head>
<body>
<h1>And your lottery numbers for this week are...</h1><br>
<h3><?=$lotterynums?></h3><br>
</body>
</html>

 

 


 

 

and here is an example

2, 4, 19, 23, 38, 41



 




   Sponsors
 

   Software
500 Java Tips E-book
PHP editor
PERL editor
Beginning Java
Beginning Visual Basic
Learn VB.net
Learn VB 6
VB and databases
ASP image library
C++ builder programming
C++ fundamentals

   Source Code
Random Amazon book link(PHP)
Split a string(ASP)
swap mouse buttons(VB)
delete a folder(VB.net)
Screen resolution(VB)
no right click function(Javascript)
Convert to Hex / Octal value(ASP)
download a web page to a file(PHP)

    




Copyright © 2004 by programmershelp.co.uk