<?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>Aummua Blog &#187; บัตรประชาชน</title>
	<atom:link href="http://www.aummua.com/tag/%e0%b8%9a%e0%b8%b1%e0%b8%95%e0%b8%a3%e0%b8%9b%e0%b8%a3%e0%b8%b0%e0%b8%8a%e0%b8%b2%e0%b8%8a%e0%b8%99/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.aummua.com</link>
	<description>บล๊อกของนายอุ้มสุดหล่อ</description>
	<lastBuildDate>Mon, 17 Jan 2011 19:14:10 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.4</generator>
		<item>
		<title>[PHP] สุ่มเลขบัตรประชาชน ลองเขียนเล่นๆ</title>
		<link>http://www.aummua.com/php-generate-id-card/</link>
		<comments>http://www.aummua.com/php-generate-id-card/#comments</comments>
		<pubDate>Sat, 27 Mar 2010 11:15:10 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Tip&Trick]]></category>
		<category><![CDATA[Web Programming]]></category>
		<category><![CDATA[genarate]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[random]]></category>
		<category><![CDATA[บัตรประชาชน]]></category>

		<guid isPermaLink="false">http://www.aummua.com/?p=198</guid>
		<description><![CDATA[วันนี้ลองหาตัว CODE สุ่มเลขบัตรมาหาไม่ได้ซะที เจอแต่วิธีคำนวนเลขบัตรเลยได้เว็บนี้มา เนื้อหา copy มาบางส่วน http://www.viruscom2.com/tip-computer/number.html :: หลักการ การคำนวนหาเลขบัตรประชาชน :: 1.มั่วตัวเลข 12 ตัวขึ้นมาแล้วแยกหลักซะ 1 2 1 3 1 4 1 5 1 6 1 7 2.คูณเข้าไปด้วยค่าประจำหลักของตัวเลขนั้นๆ (ตัวเลข 13-2 ที่ใช้คูณเป็นค่าคงที่) (1&#215;13) (2&#215;12) (1&#215;11) (3&#215;10) (1&#215;9) (4&#215;8) (1&#215;7) (5&#215;6) (1&#215;5) (6&#215;4) (1&#215;3) (7&#215;2) 3.จะได้ตัวเลขต่อไปนี้ 13 24 11 30 9 32 7 30 5 24 3 [...]]]></description>
			<content:encoded><![CDATA[<p>วันนี้ลองหาตัว CODE สุ่มเลขบัตรมาหาไม่ได้ซะที เจอแต่วิธีคำนวนเลขบัตรเลยได้เว็บนี้มา เนื้อหา copy มาบางส่วน<br />
<a href="http://www.viruscom2.com/tip-computer/number.html" target="_blank">http://www.viruscom2.com/tip-computer/number.html</a></p>
<p><strong>:: หลักการ การคำนวนหาเลขบัตรประชาชน ::</strong><br />
<strong>1.มั่วตัวเลข 12 ตัวขึ้นมาแล้วแยกหลักซะ</strong><br />
  1 2 1 3 1 4 1 5 1 6 1 7</p>
<p><strong>2.คูณเข้าไปด้วยค่าประจำหลักของตัวเลขนั้นๆ (ตัวเลข 13-2 ที่ใช้คูณเป็นค่าคงที่)</strong><br />
  (1&#215;13) (2&#215;12) (1&#215;11) (3&#215;10) (1&#215;9) (4&#215;8) (1&#215;7) (5&#215;6) (1&#215;5) (6&#215;4) (1&#215;3) (7&#215;2)</p>
<p><strong>3.จะได้ตัวเลขต่อไปนี้</strong><br />
  13 24 11 30 9 32 7 30 5 24 3 14</p>
<p><strong>4.เอาตัวเลขมาบวกกันทั้งหมด</strong><br />
  13+24+11+30+9+32+7+30+5+24+3+14= 202</p>
<p><strong>5.เอาตัวเลขที่หามาได้หารด้วย11 แล้วเอาเศษมันมา</strong><br />
  202/11 = 4</p>
<p><strong>6.ต่อมาก็ให้เอาเศษที่เราหามาได้นั้นไปลบกับ 11</strong><br />
11-4 = 7</p>
<p><strong>7.ตัวเลขที่ออกมาก็คือ</strong><br />
  121314151617<u>7</u></p>
<p><strong>:: ทีนี้มาลองดู PHP Code กันว่าเป็นยังไงจากหลักการข้างบน ::</strong><br />
<code>for( $i = 1; $i <= 12; $i++ )<br />
{<br />
$n[$i] = rand(1,9);<br />
}<br />
$step1 = ( ( $n[1] * 1 ) + ( $n[2] * 12 ) + ( $n[3] * 11 ) + ( $n[4] * 10 ) + ( $n[5] * 9 ) + ( $n[6] * 8 ) + ( $n[7] * 7 ) + ( $n[8] * 6 ) + ( $n[9] * 5 ) + ( $n[10] * 4 ) + ( $n[11] * 3 ) + ( $n[12] * 2 ) );<br />
$step2 = ( $step1 % 11 );<br />
$step3 = ( 11 - $step2 );<br />
echo $n[1].$n[2].$n[3].$n[4].$n[5].$n[6].$n[7].$n[8].$n[9].$n[10].$n[11].$n[12].$step3;</code><br />
** วิธีคำนวนหาเศษ = ( $a % $b )</p>
<div align="right"><strong>อ้างอิง</strong><br />
<a href="http://www.viruscom2.com/tip-computer/number.html" target="_blank">http://www.viruscom2.com/tip-computer/number.html</a></div>
<div style='display:none' id="post-refEl-198"></div>]]></content:encoded>
			<wfw:commentRss>http://www.aummua.com/php-generate-id-card/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
<!-- WP Super Cache is installed but broken. The path to wp-cache-phase1.php in wp-content/advanced-cache.php must be fixed! -->
