<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Technical Side of E-Business Juncture &#187; random number generator</title>
	<atom:link href="http://tech.ebusinessjuncture.com/tag/random-number-generator/feed/" rel="self" type="application/rss+xml" />
	<link>http://tech.ebusinessjuncture.com</link>
	<description>Tech Tips</description>
	<lastBuildDate>Mon, 26 Sep 2011 01:19:29 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>PHP: script to generate powerball numbers using php and gd</title>
		<link>http://tech.ebusinessjuncture.com/2009/12/php-script-to-generate-powerball-numbers-using-php-and-gd/</link>
		<comments>http://tech.ebusinessjuncture.com/2009/12/php-script-to-generate-powerball-numbers-using-php-and-gd/#comments</comments>
		<pubDate>Tue, 22 Dec 2009 20:51:52 +0000</pubDate>
		<dc:creator>Mike Kniaziewicz</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[gd]]></category>
		<category><![CDATA[powerball]]></category>
		<category><![CDATA[random number generator]]></category>

		<guid isPermaLink="false">http://tech.ebusinessjuncture.com/?p=286</guid>
		<description><![CDATA[Here is the php script to generate your own powerball numbers using php and gd: createimage.php $pb_bg_image = imagecreate(380, 75) or die('Cannot Initialize new GD image stream'); $pb_bg = imagecolorallocate($pb_bg_image, 255, 255, 255); $white = imagecolorallocate($pb_bg_image, 255, 255, 255); $gray = imagecolorallocate($pb_bg_image, 185, 185, 185); $red = imagecolorallocate($pb_bg_image,255,0,0); $black = imagecolorallocate($pb_bg_image,255,50,50); imagefilledarc($pb_bg_image, 28, 38, 58, [...]]]></description>
			<content:encoded><![CDATA[<p>Here is the php script to generate your own powerball numbers using php and gd:<br />
<strong>createimage.php</strong></p>
<pre>$pb_bg_image = imagecreate(380, 75)
      or die('Cannot Initialize new GD image stream');
$pb_bg = imagecolorallocate($pb_bg_image, 255, 255, 255);
$white = imagecolorallocate($pb_bg_image, 255, 255, 255);
$gray = imagecolorallocate($pb_bg_image, 185, 185, 185);
$red = imagecolorallocate($pb_bg_image,255,0,0);
$black = imagecolorallocate($pb_bg_image,255,50,50);
imagefilledarc($pb_bg_image, 28, 38, 58, 54,  0, 360, $gray,IMG_ARC_PIE);
imagefilledarc($pb_bg_image, 30, 38, 50, 50,  0, 360, $white,IMG_ARC_PIE);
imagefilledarc($pb_bg_image, 92, 38, 58, 54,  0, 360, $gray,IMG_ARC_PIE);
imagefilledarc($pb_bg_image, 94, 38, 50, 50,  0, 360, $white,IMG_ARC_PIE);
imagefilledarc($pb_bg_image, 156, 38, 58, 54,  0, 360, $gray,IMG_ARC_PIE);
imagefilledarc($pb_bg_image, 158, 38, 50, 50,  0, 360, $white,IMG_ARC_PIE);
imagefilledarc($pb_bg_image, 218, 38, 58, 54,  0, 360, $gray,IMG_ARC_PIE);
imagefilledarc($pb_bg_image, 220, 38, 50, 50,  0, 360, $white,IMG_ARC_PIE);
imagefilledarc($pb_bg_image, 280, 38, 58, 54,  0, 360, $gray,IMG_ARC_PIE);
imagefilledarc($pb_bg_image, 282, 38, 50, 50,  0, 360, $white,IMG_ARC_PIE);
imagefilledarc($pb_bg_image, 343, 38, 58, 54,  0, 360, $black,IMG_ARC_PIE);
imagefilledarc($pb_bg_image, 345, 38, 50, 50,  0, 360, $red,IMG_ARC_PIE);
#header ('Content-type: image/png');
imagepng($pb_bg_image);
imagedestroy($pb_bg_image);</pre>
<p><strong>number_generator.php</strong></p>
<pre>	&lt;/form&gt;
&lt;?php
	$pb = mt_rand(1,42);
	$wb1 = mt_rand(1,59);
	if($wb1 == 56){
		$wb1 = mt_rand(1,59);
	}
	$wb2 = mt_rand(1,59);
	$wb3 = mt_rand(1,59);
	$wb4 = mt_rand(1,59);
	if($wb4 == 57 || $wb4 == 58){
		$wb4 = mt_rand(1,59);
	}
	$wb5 = mt_rand(1,59);
	if($wb5 == 56){
		$wb5 = mt_rand(1,59);
	}

	?&gt;
	&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
	 &lt;?php echo "&lt;b&gt;YOUR POWERBALL NUMBERS ARE:&lt;/b&gt;
&lt;table style='background-image:url(http://localhost/ebj/pbimage.php)
;text-align:center;font-weight:bold;font-size:1.5em' width=380px
 height=75px&gt;&lt;tr&gt;&lt;td width=54px &gt;" . $wb1 . "&lt;/td&gt;&lt;td width=54px&gt;"
. $wb2 . "&lt;/td&gt;&lt;td width=54px&gt;" . $wb3 . "&lt;/td&gt;&lt;td width=54px&gt;" .
$wb4 . "&lt;/td&gt;&lt;td width=54px&gt;" . $wb5 . "&lt;/td&gt;&lt;td style='color:white'
 width=54px&gt;" . $pb . "&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;"; ?&gt;
	&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;br /&gt;&lt;br /&gt;</pre>
<p>See it in action at: <a href="http://ebusinessjuncture.com/pbnumber_generator.php" onclick="pageTracker._trackPageview('/outgoing/ebusinessjuncture.com/pbnumber_generator.php?referer=');">Powerball Number Generator</a></p>
]]></content:encoded>
			<wfw:commentRss>http://tech.ebusinessjuncture.com/2009/12/php-script-to-generate-powerball-numbers-using-php-and-gd/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

