MyBB Community Forums

Full Version: #2 Domain Giveaway (.in)
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3 4 5
meh number 8
20, pl0x
Added all above. Only 5 Slots left now.
I can see 6 left (1,2,4,10,11,15).
Also, title states 2 domain giveaway whereas description states "3 Winning Numbers" :o

What if random.org repeats the winning numbers? Like these:

[Image: 2VEWjYt.png]
[Image: jiOfwjQ.png]

Anyway, book 15 for me please ...
(2013-12-04, 11:09 AM)effone Wrote: [ -> ]I can see 6 left (1,2,4,10,11,15).
Also, title states 2 domain giveaway whereas description states "3 Winning Numbers" :o

Title says it's a second Domain Giveway Smile I believe Anurag meant on that.
Oh! I See ...
It appeared confusing to me. Should be "Second Domain Giveaway".

Anurag, you should use this function to omit duplicates:

$limitlow = 1; // Lowest range
$limithigh = 20; // Highest range
$numcount = 3; // Numbers required
// above variables to capture from form submission : $_POST['name']
$randnum = array(); // Initial blank generated number array
$j = 0; // This is the loop run counter
for($i=0;$i<$numcount;$i++){
	$j++;
	$num =  rand($limitlow, $limithigh);
	if(!in_array($num, $randnum)){ // <<<=== This check omits the number repeat
		$randnum[] = $num;
	} else {
		$i--;
	}
}
$randnum = implode(',',$randnum);
echo 'Loop ran to generate numbers: '.$j.'<br>';
echo 'Winning numbers are: '.$randnum;
(2013-12-04, 11:09 AM)effone Wrote: [ -> ]I can see 6 left (1,2,4,10,11,15).
Also, title states 2 domain giveaway whereas description states "3 Winning Numbers" :o

What if random.org repeats the winning numbers? Like these:

[Image: 2VEWjYt.png]
[Image: jiOfwjQ.png]

Anyway, book 15 for me please ...

Yes you are right, sorry about that. Added you. Now there is 5.
Also for the giveaway, I will record the video and upload it to youtube for being fair, while generating, If a number comes twice after generating, I will run it again until I find three different integers for the giveaway. If a number repeats in a result, all the numbers will be cancelled and I will run it again.
I choose 10
I'll take the number 11 please and thank you.
Two please!
Pages: 1 2 3 4 5