<?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>Saturngod &#187; PHP</title>
	<atom:link href="http://www.saturngod.net/category/opensource/php/feed" rel="self" type="application/rss+xml" />
	<link>http://www.saturngod.net</link>
	<description>What&#039;s on my mind</description>
	<lastBuildDate>Fri, 10 Feb 2012 16:00:31 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Ava Lite</title>
		<link>http://www.saturngod.net/knowledgebase/ava-lite?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=ava-lite</link>
		<comments>http://www.saturngod.net/knowledgebase/ava-lite#comments</comments>
		<pubDate>Fri, 25 Feb 2011 17:57:04 +0000</pubDate>
		<dc:creator>saturngod</dc:creator>
				<category><![CDATA[Knowledgebase]]></category>
		<category><![CDATA[Opensource]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Ava]]></category>

		<guid isPermaLink="false">http://www.saturngod.net/?p=4141</guid>
		<description><![CDATA[Ava framework ကို ရေးပြီးတာတော့ ကြာပြီ။ ဒါပေမယ့် bluehost မှာ တင်တော့ ပြဿနာ တက်တာပဲ။ ဘာလို့လည်းဆိုတော့ memory usages အရမ်းများနေလို့။ ဘာကြောင့်များတာလဲလို့ code ကို ကြည့်လိုက်တော့ class ကို recursive ဖြစ်နေတာတွေ့ ရတယ်။ အဲဒါက အဓိက ပြဿနာပဲ။ အဲဒီ recursive က dead lock ဖြစ်သွားပြီး memory limit ပြည့်သွားတာ။ အစက hosting ကို သွားပြီး &#8230; <a href="http://www.saturngod.net/knowledgebase/ava-lite">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<span style="font-family:'Masterpiece Uni Sans',Yunghkio,Myanmar3, Parabaik, Padauk, 'WinUni Innwa', 'Win Uni Innwa', 'MyMyanmar Unicode',Myanmar2;"><p>Ava framework ကို ရေးပြီးတာတော့ ကြာပြီ။ ဒါပေမယ့် bluehost မှာ တင်တော့ ပြဿနာ တက်တာပဲ။ ဘာလို့လည်းဆိုတော့ memory usages အရမ်းများနေလို့။ ဘာကြောင့်များတာလဲလို့ code ကို ကြည့်လိုက်တော့ class ကို recursive ဖြစ်နေတာတွေ့ ရတယ်။</p>
<pre class="brush: php; title: ; notranslate"> $this-&gt;load=$this; </pre>
<p>အဲဒါက အဓိက ပြဿနာပဲ။ အဲဒီ recursive က dead lock ဖြစ်သွားပြီး memory limit ပြည့်သွားတာ။ အစက hosting ကို သွားပြီး အပြစ်တင်သေးတယ်။ ဒါပေမယ့် ကိုယ့်ဘာသာ code ကို သေချာပြန်စစ်တော့ အဲဒီ နေရာက ပြဿနာ တက်ပါလေရော။ ပြန်ပြင်မယ်ဆိုတော့လည်း လက်ရှိ ရေးထားတဲ့ အပိုင်းတွေကို အကုန်လိုက်မပြင်ချင်ဘူး။ application folder က အပိုင်းကို မပြင်ရအောင် core တစ်ခုလုံး ပြင်ဖို့ ကြိုးစားရကော။ သို့သော် မရ။ ဘယ်လို ရေးရမယ်ဆိုတဲ့ idea ကို ကောင်းကောင်းမရဘူး။ Google ကလိုက်ရှာတော့လည်း မတွေ့ဘူး။ တော်တော်များများက $this->load=$this; နဲ့ ရေးထားတဲ့ tutorial တွေ အရမ်းများနေတယ်။</p>
<p>မဖြစ်သေးပါဘူး။ light version ကနေ စရေးရမယ်ဆိုပြီး စဖြစ်လိုက်တာပဲ။ ရေးမယ်တာ ပြောတာ။ ဘယ်က စရမှန်း မသိ။ UML တွေ ဆွဲကြည့်ရင်းနဲ့ သဘောတစ်ခုပေါက်သွားတာက Singleton ကို ငါ သုံးသင့်တာပဲ ဆိုပြီး သဘောပေါက်သွားတယ်။ Objective-c ကို အဲမှာ ကျေးဇူးတင်ရမယ်။ Objective-C လေ့လာရင်းနဲ့ memory တွေ အတတ်နိုင်ဆုံး နည်းအောင် ဘယ်လိုရေးသင့်လဲဆိုတာကို စဉ်းစားတတ်လာတာ။ iPhone 3Gs လို memory နည်းနည်းလေးမှာ ဘယ်လိုမျိုး သုံးရင် အဆင်ပြေမလဲဆိုတာကို ထည့်သွင်းစဉ်းစားလာရတာကြောင့်လည်း ပါတယ်။ အဲဒါက လက်ရှိ Ava framework ကို ပြန်ပြင်ဖို့ အများကြီး အထောက်အပံ့လာဖြစ်တယ်။ Core တစ်ခုလုံးကို Singleton ထားပြီး အဲဒီမှာပဲ initialize လုပ်သွားရင် သက်သာသွားမယ်။ recursive မဖြစ်တော့ဘူး။<br />
<span id="more-4141"></span><br />
နောက်တချက်က Loader ကို ခေါ်တဲ့ အခါမှာ Passing by Reference နဲ့ အသုံးပြုရင် ပိုသက်သာသွားမယ်။ class ကို ခဏခဏ load ခေါ်နေစရာ မလိုတော့ဘူး။ ဒီတော့ ဒီလို ရေးဖြစ်သွားမယ်။</p>
<p>controller.php မှာ load ကို ဒီလိုခေါ်လိုက်တယ်။</p>
<pre class="brush: php; title: ; notranslate">$this-&gt;load =&amp; load_class('Loader');</pre>
<p>ပြီးတော့ load_class အတွက် function ထဲမှာ</p>
<pre class="brush: php; title: ; notranslate">
function &amp;load_class($class)
{
	static $objects = array();

	if($class=='Loader')
	{
		$name=&quot;Ava_Loader&quot;;
	}
	// Does the class exist?  If so, we're done...
	if (isset($objects[$name]))
	{
		return $objects[$name];
	}

	$objects[$class] =&amp; instantiate_class(new $name());
	return $objects[$class];
}

function &amp;instantiate_class(&amp;$class_object)
{
	return $class_object;
}
</pre>
<p>By Reference နဲ့ပဲ ခေါ်လိုက်တာကြောင့် loader class က အဆင်ပြေသွားပြီ။ နောက်ပြီး model class ကိုလည်း ပြန်ပြောင်းရသေးတယ်။ model class မှာ တစ်ခု ထပ်စဉ်းစားရတာက လက်ရှိ controller က ခေါ်ထားတဲ့ ဟာတွေပဲ ပြန်ပြီး ခေါ်လို့ရရမယ်။ ဥပမာ controller က model1 ကို ခေါ်ထားတော့ model2 ထဲမှာ model1 ကို ထပ်ခေါ်စရာမလိုပဲ တိုက်ရိုက် ခေါ်လို့ရရမယ်။</p>
<p>အဲဒီတော့ အကုန်လုံးကို ပြန်ပြီး assign လုပ်လိုက်တယ်။</p>
<pre class="brush: php; title: ; notranslate">
function _assign_libraries($use_reference = TRUE)
	{
			$Ava =&amp; get_instance();
			foreach (array_keys(get_object_vars($Ava)) as $key)
			{
				if ( ! isset($this-&gt;$key) AND $key != $this-&gt;_parent_name)
				{
					// In some cases using references can cause
					// problems so we'll conditionally use them
					if ($use_reference == TRUE)
					{
						$this-&gt;$key = NULL; // Needed to prevent reference errors with some configurations
						$this-&gt;$key =&amp; $Ava-&gt;$key;
					}
					else
					{
						$this-&gt;$key = $Ava-&gt;$key;
					}
				}
			}
	}
</pre>
<p>Model လိုမျိုး view မှာလည်း အဲဒီ အတိုင်းပဲ။ ဒါကြောင့် view ကိုခေါ်တဲ့ အခါမှာ ပြန်ပြီး assign လုပ်ပေးဖို့လိုတယ်။</p>
<pre class="brush: php; title: ; notranslate">
$_ava_Ava =&amp; get_instance();
			foreach (get_object_vars($_ava_Ava) as $_ava_key =&gt; $_ava_var)
			{
				if ( ! isset($this-&gt;$_ava_key))
				{
					$this-&gt;$_ava_key =&amp; $_ava_Ava-&gt;$_ava_key;
				}
			}
</pre>
<p>လက်ရှိ Base class ကို singleton အနေနဲ့ သုံးလိုက်တာဟာ ပြဿနာတွေ အများကြီး ပြေလည်သွားတယ်။ UML ဆွဲတုန်းက idea သာ ရတာ။ ခက်တာက ဘယ်လို ရေးရမှန်းမသိ။ ကိုယ့်ဘာသာကိုယ်တောင် ရှက်မိတယ်။ PHP ကို သိရုံပဲ သိသေးပါလား ဆိုပြီး တွေးမိလေရဲ့။ By Reference တွေနဲ့ ဘယ်အချိန်မှာ ဘယ်လို ခေါ်ရေးရမှန်း မသိဘူး။ ဒါနဲ့ CodeIgniter ရဲ့ မူရင်း code ကို အသေးစိတ် လိုက်ဖတ်ရင်းနဲ့ သူရေးထားတာ သဘောပေါက်လာတာ။ အခု လက်ရှိ code တွေအကုန်လုံးက CodeIgniter က code တွေကို မှီငြမ်းထားတာပါပဲ။</p>
<p>ဒီနေ့တော့ <a href="https://github.com/saturngod/Ava/tree/ava-lite">lite</a> version လေး ပြီးတာ ကျေနပ်သွားတယ်။ မနက်ဖြန်ဆိုရင်တော့ Ava Framework ကို စလို့ရပြီ။ core တစ်ခုလုံးကိုတော့ အစ အဆုံးပြန်ပြင်ရေးရမယ်။ အဲဒါပြီးမှပဲ Ava Documentation ကို သေချာအောင် ပြန်ပြီး ရေးရမယ်။ အခုတော့ http://www.avaframework.com ဆိုပြီး domain name ပဲ ဝယ်ထားတယ်။ Ava framework လေးကိုတော့ သေသေချာချာ လေးလုပ်ဖို့ စဉ်းစားထားတယ်။ Ornagai ကို ava နဲ့ ပြန်ပြင်ဖို့ စဉ်းစားထားတာကြောင့်လည်း ပါတာပေါ့။ ဒါနဲ့ Ava ဆိုတာက အဝ နော်။ အာဗ မဟုတ်ဘူး။ အင်းဝမြို့ နာမည်ကို အစွဲပြုပြီး အဝ လို့ ပေးထားလိုက်တာ။ </p>
<p>ပထမဆုံး ပေးခဲ့တဲ့ နာမည်က Apiwork ။ နောက်တော့ Nifty ။ ပြီးတော့ Nod ။ နောက်ဆုံး အဝ ဆိုတဲ့ နာမည်လေးနဲ့မှ စိတ်ကျေနပ်သွားတာနဲ့ အဝ ဆိုပြီး ပဲ ပေးလိုက်တာ။ lite version ကို စမ်းကြည့်ပါ။ လိုတာတွေ ရှိလည်း ပြောပါ။ lite version က MVC design pattern ကို apply လုပ်ထားတာပဲ ရှိပါတယ်။ ဘာ function မှ မပါဘူး။ လုံးဝ foundation core အဆင့်ပေါ့။ framework ကိုယ်ပိုင် ရေးချင်တဲ့သူတွေအတွက် အရမ်းကို ကောင်းမွန်တဲ့ core လို့ပဲ ဆိုရမှာပေါ့။ နောက်ပြီး သုံးထားတာက MIT license ပါ။ ဒါကြောင့် လွတ်လွတ်လပ်လပ် သုံးလို့ရတယ်။ ပြင်လို့ရပါတယ်။</p>
</span>]]></content:encoded>
			<wfw:commentRss>http://www.saturngod.net/knowledgebase/ava-lite/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Change Nifty to Ava</title>
		<link>http://www.saturngod.net/opensource/change-nifty-to-ava?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=change-nifty-to-ava</link>
		<comments>http://www.saturngod.net/opensource/change-nifty-to-ava#comments</comments>
		<pubDate>Sun, 13 Feb 2011 16:13:38 +0000</pubDate>
		<dc:creator>saturngod</dc:creator>
				<category><![CDATA[Opensource]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[nifty]]></category>
		<category><![CDATA[nod]]></category>

		<guid isPermaLink="false">http://www.saturngod.net/?p=4103</guid>
		<description><![CDATA[အခုခေတ်ကြီးက နာမည်ပေးရတာ ခက်တဲ့ ခေတ်လို့ပဲ ဆိုရမလားမသိဘူး။ Nifty ဆိုတဲ့ နာမည်လေး ကြိုက်လို့ ပေးထားတာ အခု ကို ဒီဘီ ပြောလို့ ရှာကြည့်လိုက်တာ Nifty PHP framework က ရှိပြီးသားဖြစ်နေတယ်။ အခြား နာမည်လှလှလေး နောက်ပြီး Nifty နဲ့ အဓိပ္ပာယ်တူတဲ့ စာလုံးတွေကို ရှာကြည့်တော့လည်း ရှိပြီးသားတွေပဲ။ Nod ဆိုတာကတော့ ခေါင်းညိတ် တယ်ဆိုတဲ့ အဓိပ္ပာယ်ပါ။ ornagai မှာတော့ ခေါင်းညိတ်သည် ။ ခေါင်းညိတ်ပြသည်။ ။ &#8230; <a href="http://www.saturngod.net/opensource/change-nifty-to-ava">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<span style="font-family:'Masterpiece Uni Sans',Yunghkio,Myanmar3, Parabaik, Padauk, 'WinUni Innwa', 'Win Uni Innwa', 'MyMyanmar Unicode',Myanmar2;"><p>အခုခေတ်ကြီးက နာမည်ပေးရတာ ခက်တဲ့ ခေတ်လို့ပဲ ဆိုရမလားမသိဘူး။ Nifty ဆိုတဲ့ နာမည်လေး ကြိုက်လို့ ပေးထားတာ အခု ကို ဒီဘီ ပြောလို့ ရှာကြည့်လိုက်တာ Nifty PHP framework က ရှိပြီးသားဖြစ်နေတယ်။ အခြား နာမည်လှလှလေး နောက်ပြီး Nifty နဲ့ အဓိပ္ပာယ်တူတဲ့ စာလုံးတွေကို ရှာကြည့်တော့လည်း ရှိပြီးသားတွေပဲ။ Nod ဆိုတာကတော့ ခေါင်းညိတ် တယ်ဆိုတဲ့ အဓိပ္ပာယ်ပါ။ ornagai မှာတော့</p>
<blockquote><p>ခေါင်းညိတ်သည် ။ ခေါင်းညိတ်ပြသည်။ ။ ခေါင်းတစ်ညိမ့်ညိမ့်လုပ်သည် ။ ပန်းစသည် လေ၌တစ်ညိမ့်ညိမ့်လှုပ်ရှားနေသည် ။ ခေါင်းညိတ်ခြင်း ။ ခေါင်းညိတ်ပြခြင်း ။</p></blockquote>
<p>လို့ ဆိုထားပါတယ်။ NOD 32 ရဲ့ Nemocnica na Okraji Disku (&#8220;Hospital at the end of the disk&#8221;) လို့ အမည်ရပါတယ်။ အဲဒီ အမည်က ဘယ်က လာတာလဲဆိုတော့  Nemocnice na okraji města (Hospital at the End of the City) ဆိုတဲ့ TV series နာမည်ကို ပြန်လည် ပြုပြင်ထားတယ်လို့ ဆိုပါတယ်။။ <a href="https://github.com/saturngod/nod">Nod Framework</a> ဆိုတာကတော့ လက်ရှိ နာမည်မရှိသေးတာကြောင့် အဲဒီ နာမည်ပဲ ယူလိုက်ရတယ်။ ဒီနေ့ MRT ပေါ်မှာ စဉ်းစားမိတဲ့ နာမည်က Ava လို့ ခေါ်ကြတဲ့ အင်းဝ ပဲ။  အဲဒီ နာမည်လေးကို ပိုကြိုက်တာနဲ့ မနက်မှာပဲ Ava လို့ ထပ်ပြောင်းလိုက်တယ်။</p>
<p>နာမည်ရှာရတာ တော်တော်ခက်တာပဲဗျာ။ နာမည်လှလှလေးတွေ မြန်သမျှ Framework တွေ က ရှိပြီးသား ဆိုတော့ နာမည်ထပ်ပေးလို့ မကောင်းဘူး။ PHP framework မဟုတ်ခဲ့ရင်တော့ python , ruby စတဲ့ framework နာမည်တွေက ရှိပြီးသားတွေ ဖြစ်နေတယ်။ ဒီနေ့ document စရေးဖို့ ကြိုးစားနေတာ။ CodeIgniter လိုမျိုး Document ပုံစံကို သဘောကျပေမယ့် HTML template အတွက် Dreamweaver လိုမျိုး Application သုံးနေရလိမ့်မယ်။ Dreamweaver ကလည်း ဝယ်မသုံးနိုင်။ ခိုးပြီးလည် းမသုံးချင်တော့ မသုံးဘူးပေါ့ ။ ဒါနဲ့ ကိုယ့်ဘာသာ ကိုယ် document ရေးဖို့ php နဲ့ပဲ Ava Framework ကို သုံးပြီး ရေးကြည့်အုံးမယ်။<br />
<span id="more-4103"></span></p>
<p>Document က အရေးကြီးတယ်။ လက်ရှိ framework ကို အခြားသူတွေ ကောင်းကောင်း သုံးကြည့်ဖို့ စမ်းကြည့်ဖို့ document က လိုအပ်တယ်။ framework တစ်ခုလုံးက ကျွန်တော့်အတွက်ကတော့ အရမ်းပဲ လွယ်ကူ ရိုးရှင်းလွန်းတယ်။ သို့ပေမယ့် အခြားသူတွေအတွက် အဲလောက်တော့ မလွယ်ဘူးထင်တာပဲ။ MVC ဆိုတာ ဘာမှန်းမသိတဲ့ PHP developer တွေ ရှိသေးတယ်။ site တစ်ခုလုံးက MVC နဲ့ database ပိုင်းကိုတော့ PDO သုံးထားတယ်။ MVC ဆိုတာက pattern ပါပဲ။ ထွေထွေထူးထူးတော့ မဟုတ်ပါဘူးလေ။ အခုတော့ အိပ်တော့မယ်။ PHP ရေးရတာ objective c ရေးရတာထက် ပျော်ဖို့ ကောင်းတယ်။ objective c ရေးရင် ခဏခဏ memory leak ပြဿနာ ဖြစ်တယ်။ အဲဒါကိုလည်း သတိထားပြီး ရေးတတ်အောင် ကြိုးစားရအုံးမယ်။</p>
<p>Language တစ်ခုကနေ တစ်ခုကို ကူးပြောင်းပြီး လေ့လာတယ်ဆိုတာ လွယ်တော့မလွယ်ဘူး။ အဲလိုပဲ framework တစ်ခုကို အသဲစွဲအောင် ကြိုက်ပြီး သုံးနေတဲ့သူတွေ နောက်ထပ် framework တစ်ခုကို ပြောင်းသုံးဖို့ ဆိုတာ မလွယ်ဘူး။ CI ကို ကျွန်တော်လည်း အသေကြိုက်ခဲ့တယ်။ ဒါကြောင့် CI ကို တုပြီး ကိုယ့်ဘာသာကိုယ် framework ရေးရင်းနဲ့ နောက်ဆုံး Ava ဖြစ်သွားပြီး MZ user ကို Ava ပေါ်မှာပဲ ရေးဖြစ်သွားတာပေါ့။ Ava မှာ Restful ကို ထည့်ရမယ်။ အဲဒါ အရေးကြီးတယ်။ ဘာလို့လည်းဆိုတော့ Ornagai API က Restful ကို အသုံးပြုထားလို့ပဲ။</p>
</span>]]></content:encoded>
			<wfw:commentRss>http://www.saturngod.net/opensource/change-nifty-to-ava/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Ornagai Setup</title>
		<link>http://www.saturngod.net/opensource/php/ornagai-setup?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=ornagai-setup</link>
		<comments>http://www.saturngod.net/opensource/php/ornagai-setup#comments</comments>
		<pubDate>Tue, 19 Oct 2010 13:36:41 +0000</pubDate>
		<dc:creator>saturngod</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Project]]></category>
		<category><![CDATA[ornagai]]></category>

		<guid isPermaLink="false">http://www.saturngod.net/?p=3677</guid>
		<description><![CDATA[Ornagai ကို localhost မှာ ဘယ်လို သွင်းရမလဲ ဆိုသူများအတွက် https://github.com/saturngod/ornagai-V2/wiki/Ornagai-Setup အရင်ဆုံးတော့ Ornagai ကို download ချထားဖို့တော့ လိုတာပေါ့။]]></description>
			<content:encoded><![CDATA[<span style="font-family:'Masterpiece Uni Sans',Yunghkio,Myanmar3, Parabaik, Padauk, 'WinUni Innwa', 'Win Uni Innwa', 'MyMyanmar Unicode',Myanmar2;"><p>Ornagai ကို localhost မှာ ဘယ်လို သွင်းရမလဲ ဆိုသူများအတွက်</p>
<p>https://github.com/saturngod/ornagai-V2/wiki/Ornagai-Setup</p>
<p>အရင်ဆုံးတော့ Ornagai ကို download ချထားဖို့တော့ လိုတာပေါ့။</p>
</span>]]></content:encoded>
			<wfw:commentRss>http://www.saturngod.net/opensource/php/ornagai-setup/feed</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>Nifty Framework</title>
		<link>http://www.saturngod.net/opensource/nifty-framework?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=nifty-framework</link>
		<comments>http://www.saturngod.net/opensource/nifty-framework#comments</comments>
		<pubDate>Sun, 03 Oct 2010 11:19:08 +0000</pubDate>
		<dc:creator>saturngod</dc:creator>
				<category><![CDATA[Opensource]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Project]]></category>
		<category><![CDATA[MVC]]></category>

		<guid isPermaLink="false">http://www.saturngod.net/?p=3609</guid>
		<description><![CDATA[MVC ဘယ်လို ရေးရလဲ။ MVC ကို ကိုယ့်ဘာသာ ကိုယ် PHP နဲ့ရေးချင်တယ်။ MVC ကို CI တို့အခြား Framework မသုံးချင်ဘူး။ ကိုယ်တိုင် စမ်းရေးကြည့်ချင်တယ်။ ဘယ်လို ရေးရမှန်းမသိဘူး။ အဲလိုမျိုး မေးခွန်းလေးတွေ ခဏခဏ ကြားနေရတဲ့အတွက် ကျွန်တော် Nifty ဆိုတဲ့ framework ကို ရေးထားပါတယ်။ အရမ်းကို ရိုးရှင်းပြီး OOP ကိုပဲ အသုံးပြုထားပါတယ်။ MVC ပဲ ပါပါတယ်။ helper တို့ database &#8230; <a href="http://www.saturngod.net/opensource/nifty-framework">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<span style="font-family:'Masterpiece Uni Sans',Yunghkio,Myanmar3, Parabaik, Padauk, 'WinUni Innwa', 'Win Uni Innwa', 'MyMyanmar Unicode',Myanmar2;"><p>MVC ဘယ်လို ရေးရလဲ။ MVC ကို ကိုယ့်ဘာသာ ကိုယ် PHP နဲ့ရေးချင်တယ်။ MVC ကို CI တို့အခြား Framework မသုံးချင်ဘူး။ ကိုယ်တိုင် စမ်းရေးကြည့်ချင်တယ်။ ဘယ်လို ရေးရမှန်းမသိဘူး။ အဲလိုမျိုး မေးခွန်းလေးတွေ ခဏခဏ ကြားနေရတဲ့အတွက် ကျွန်တော် <a href="https://github.com/saturngod/Ava/tree/light" target="_blank">Nifty</a> ဆိုတဲ့ framework ကို ရေးထားပါတယ်။ အရမ်းကို ရိုးရှင်းပြီး OOP ကိုပဲ အသုံးပြုထားပါတယ်။ MVC ပဲ ပါပါတယ်။ helper တို့ database class တို့ မပါပါဘူး။ core ပဲပေါ့။ core တည်ဆောက်ပုံ သိရှိသွားရင် အပေါ်မှာ ကိုယ့်ဘာသာကိုယ် helper class ထည့်တာတို့ database class ထည့်တာတို့ကို လွယ်လွယ်ကူကူ ဖန်တီးနိုင်ပါလိမ့်မယ်။<br />
<span id="more-3609"></span><br />
အဲဒီ framework ရေးတာ ၄၅ မိနစ်လောက်ပဲ ကြာပါတယ်။ အရမ်းကို လွယ်ကူ ရိုးရှင်းပါတယ်။ ကျွန်တော် ဘာမှ မစဉ်းစားပဲ ဒီအတိုင်း လက်တန်းချရေးလိုက်တာပဲ။ လက်ရှိ APIWork ကတော့ တော်တော်လေးကို အဆင်ပြေသွားပြီ။ APIWork ကတော့ htaccess နဲ့ ရေးထားတာ။ ဒီ Nifty ကတော့ APIWork က idea လေးတွေ ပါပေမယ့် မတူဘူး။ htaccess ကိုသုံးရင် apache တစ်ခုတည်း အတွက် ကန့်သတ်ထားတာ ဖြစ်သွားပါလိမ့်မယ်။ ဒါကြောင့် index.php/controller/action ဆိုပြီး CI သွားတဲ့ ပုံစံကို ယူပြီး MVC framework တည်ဆောက်ထားပါတယ်။ လေ့လာကြည့်ပါ။ ကိုယ်ပိုင် MVC စဆောက်မယ့် PHP သမားတွေ အတွက်တော့ လေ့လာရတာ ထိုက်တန်မယ်လို့ မျှော်လင့်ပါတယ်။</p>
</span>]]></content:encoded>
			<wfw:commentRss>http://www.saturngod.net/opensource/nifty-framework/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Deprecated features in PHP 5.3.x</title>
		<link>http://www.saturngod.net/knowledgebase/deprecated-features-in-php-5-3-x?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=deprecated-features-in-php-5-3-x</link>
		<comments>http://www.saturngod.net/knowledgebase/deprecated-features-in-php-5-3-x#comments</comments>
		<pubDate>Thu, 22 Jul 2010 07:48:20 +0000</pubDate>
		<dc:creator>saturngod</dc:creator>
				<category><![CDATA[Knowledgebase]]></category>
		<category><![CDATA[News]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Deprecated]]></category>

		<guid isPermaLink="false">http://www.saturngod.net/?p=3166</guid>
		<description><![CDATA[PHP 5.3 မှာ သုံးလို့မရတော့တဲ့ function တွေပါလာပါတယ်။ ကျွန်တော်တောင် ornagai မှာ split function သုံးထားတာကို ပြန်ပြင်လိုက်ရတယ်။ အဲလိုအခါတွေမှာ ဘာ function အစားထိုးရမလဲဆိုတာကို သိထားဖို့လိုပါတယ်။ အဲဒီအတွက်လည်း php.net မှာ ညွှန်းဆိုထားပြီးသားပါ။ split အစား preg_split() ကို အစားထိုးသုံးရပါတယ်။ အခြား function တွေလည်း အစားထိုးပြောင်းလဲသုံးရတာတွေ ရှိပါတယ်။ deprecated လုပ်လိုက်တာလည်း ကောင်းပါတယ်။ အချို့ function တွေ duplicate ဖြစ်နေတာတွေရှိနေတယ်။ &#8230; <a href="http://www.saturngod.net/knowledgebase/deprecated-features-in-php-5-3-x">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<span style="font-family:'Masterpiece Uni Sans',Yunghkio,Myanmar3, Parabaik, Padauk, 'WinUni Innwa', 'Win Uni Innwa', 'MyMyanmar Unicode',Myanmar2;"><p>PHP 5.3 မှာ သုံးလို့မရတော့တဲ့ function တွေပါလာပါတယ်။ ကျွန်တော်တောင် ornagai မှာ split function သုံးထားတာကို ပြန်ပြင်လိုက်ရတယ်။ အဲလိုအခါတွေမှာ ဘာ function အစားထိုးရမလဲဆိုတာကို သိထားဖို့လိုပါတယ်။ အဲဒီအတွက်လည်း php.net မှာ ညွှန်းဆိုထားပြီးသားပါ။ split အစား preg_split() ကို အစားထိုးသုံးရပါတယ်။ အခြား function တွေလည်း အစားထိုးပြောင်းလဲသုံးရတာတွေ ရှိပါတယ်။ deprecated လုပ်လိုက်တာလည်း ကောင်းပါတယ်။ အချို့ function တွေ duplicate ဖြစ်နေတာတွေရှိနေတယ်။ လိုလည်း မလိုလောက်ဘူးထင်တာပဲ။ အချို့ function တွေက သုံးတဲ့လူတော်တော် ရှားပါတယ်။<br />
<span id="more-3166"></span><br />
သုံးမရတော့တဲ့ function နဲ့ ပြောင်းလဲသုံးရမယ့် list ကို အောက်မှာ ပြထားပါတယ်။</p>
<p>Deprecated functions:</p>
<ul>
<li> <a href="http://www.php.net/manual/en/function.call-user-method.php">call_user_method()</a> (use      <a href="http://www.php.net/manual/en/function.call-user-func.php">call_user_func()</a> instead)</li>
<li> <a href="http://www.php.net/manual/en/function.call-user-method-array.php">call_user_method_array()</a> (use      <a href="http://www.php.net/manual/en/function.call-user-func-array.php">call_user_func_array()</a> instead)</li>
<li> <a href="http://www.php.net/manual/en/function.define-syslog-variables.php">define_syslog_variables()</a></li>
<li> <a href="http://www.php.net/manual/en/function.dl.php">dl()</a></li>
<li> <a href="http://www.php.net/manual/en/function.ereg.php">ereg()</a> (use <a href="http://www.php.net/manual/en/function.preg-match.php">preg_match()</a> instead)</li>
<li> <a href="http://www.php.net/manual/en/function.ereg-replace.php">ereg_replace()</a> (use <a href="http://www.php.net/manual/en/function.preg-replace.php">preg_replace()</a> instead)</li>
<li> <a href="http://www.php.net/manual/en/function.eregi.php">eregi()</a> (use <a href="http://www.php.net/manual/en/function.preg-match.php">preg_match()</a> with the      <em>&#8216;i&#8217;</em> modifier instead)</li>
<li> <a href="http://www.php.net/manual/en/function.eregi-replace.php">eregi_replace()</a> (use <a href="http://www.php.net/manual/en/function.preg-replace.php">preg_replace()</a> with the <em>&#8216;i&#8217;</em> modifier instead)</li>
<li> <a href="http://www.php.net/manual/en/function.set-magic-quotes-runtime.php">set_magic_quotes_runtime()</a> and its alias,      <a href="http://www.php.net/manual/en/function.magic-quotes-runtime.php">magic_quotes_runtime()</a></li>
<li> <a href="http://www.php.net/manual/en/function.session-register.php">session_register()</a> (use the <var><var><a href="http://www.php.net/manual/en/reserved.variables.session.php">$_SESSION</a></var></var> superglobal instead)</li>
<li> <a href="http://www.php.net/manual/en/function.session-unregister.php">session_unregister()</a> (use the      <var><var><a href="http://www.php.net/manual/en/reserved.variables.session.php">$_SESSION</a></var></var> superglobal instead)</li>
<li> <a href="http://www.php.net/manual/en/function.session-is-registered.php">session_is_registered()</a> (use the      <var><var><a href="http://www.php.net/manual/en/reserved.variables.session.php">$_SESSION</a></var></var> superglobal instead)</li>
<li> <a href="http://www.php.net/manual/en/function.set-socket-blocking.php">set_socket_blocking()</a> (use      <a href="http://www.php.net/manual/en/function.stream-set-blocking.php">stream_set_blocking()</a> instead)</li>
<li> <a href="http://www.php.net/manual/en/function.split.php">split()</a> (use <a href="http://www.php.net/manual/en/function.preg-split.php">preg_split()</a> instead)</li>
<li> <a href="http://www.php.net/manual/en/function.spliti.php">spliti()</a> (use <a href="http://www.php.net/manual/en/function.preg-split.php">preg_split()</a> with the      <em>&#8216;i&#8217;</em> modifier instead)</li>
<li> <a href="http://www.php.net/manual/en/function.sql-regcase.php">sql_regcase()</a></li>
<li> <a href="http://www.php.net/manual/en/function.mysql-db-query.php">mysql_db_query()</a> (use      <a href="http://www.php.net/manual/en/function.mysql-select-db.php">mysql_select_db()</a> and <a href="http://www.php.net/manual/en/function.mysql-query.php">mysql_query()</a> instead)</li>
<li> <a href="http://www.php.net/manual/en/function.mysql-escape-string.php">mysql_escape_string()</a> (use      <a href="http://www.php.net/manual/en/function.mysql-real-escape-string.php">mysql_real_escape_string()</a> instead)</li>
<li> Passing locale category names as strings is now deprecated. Use the LC_*      family of constants instead.</li>
<li> The <em><tt>is_dst</tt></em> parameter to <a href="http://www.php.net/manual/en/function.mktime.php">mktime()</a>.      Use the new timezone handling functions instead.</li>
</ul>
<p><strong>Reference</strong></p>
<p><a href="http://php.net/manual/en/migration53.deprecated.php">http://php.net/manual/en/migration53.deprecated.php</a></p>
</span>]]></content:encoded>
			<wfw:commentRss>http://www.saturngod.net/knowledgebase/deprecated-features-in-php-5-3-x/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Short Note Of PHP &#8212; 2</title>
		<link>http://www.saturngod.net/knowledgebase/short-note-of-php-2?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=short-note-of-php-2</link>
		<comments>http://www.saturngod.net/knowledgebase/short-note-of-php-2#comments</comments>
		<pubDate>Thu, 27 Aug 2009 18:36:45 +0000</pubDate>
		<dc:creator>saturngod</dc:creator>
				<category><![CDATA[Knowledgebase]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://www.saturngod.net/?p=1654</guid>
		<description><![CDATA[Integer ပေါင်းနှုတ်မြှောက်စား ကိစ္စတွေအတွက် အသုံးပြုတယ်။ Strings စာတွေ text တွေအတွက် အသုံးပြုတယ်။ $str=&#8221;Hello World&#8221;; Booleans True or Flase condition တွေအတွက် အသုံးပြုတယ်။ Compound Data Types အခြား ထပ်မံပါဝင်တဲ့ data types တွေကတော့ Arrays &#8211; variable တစ်ခုထက် ပိုတာတွေကို သိမ်းတယ်။ နောက်ပိုင်း Arrary အပိုင်းမှာ ပါမှာပါ။ Objects &#8211; data ကော &#8230; <a href="http://www.saturngod.net/knowledgebase/short-note-of-php-2">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<span style="font-family:'Masterpiece Uni Sans',Yunghkio,Myanmar3, Parabaik, Padauk, 'WinUni Innwa', 'Win Uni Innwa', 'MyMyanmar Unicode',Myanmar2;"><p><strong>Integer</strong></p>
<p>ပေါင်းနှုတ်မြှောက်စား ကိစ္စတွေအတွက် အသုံးပြုတယ်။</p>
<p><strong>Strings</strong></p>
<p>စာတွေ text တွေအတွက် အသုံးပြုတယ်။</p>
<blockquote><p>$str=&#8221;Hello World&#8221;;</p></blockquote>
<p><strong>Booleans</strong></p>
<p>True or Flase condition တွေအတွက် အသုံးပြုတယ်။</p>
<p><strong>Compound Data Types</strong></p>
<p>အခြား ထပ်မံပါဝင်တဲ့ data types တွေကတော့</p>
<p>Arrays &#8211; variable တစ်ခုထက် ပိုတာတွေကို သိမ်းတယ်။ နောက်ပိုင်း Arrary အပိုင်းမှာ ပါမှာပါ။</p>
<p>Objects &#8211; data ကော code ကော နှစ်ခု လုံးပါဝင်ပါတယ်။</p>
<p><strong>Other Data Types</strong></p>
<p>NULL &#8211; ဘာမှ မရှိတဲ့ value။ No value ပေါ့။</p>
<p>resource &#8211; PHP မှာ သီးသန့်အသုံးပြုတာ။ external resources တွေကို ညွှန်ပြပေးတယ်။</p>
<p><strong>Converting Between Data Types</strong></p>
<p>float နဲ့တွက်ပြီး int ပြန်ထုတ်ချင်တဲ့အခါမှာ</p>
<blockquote><p>$x =10.88;</p>
<p>echo (int) $x; //outputs 10</p></blockquote>
<p><strong>Variable</strong></p>
<p>Variable ဆိုတာ temporary storage containers တွေပါ။ Variable name တွေကို a-z,A-Z စပြီးပေးလို့ရပြီး နောက်ပိုင်းမှာ number တွေ လိုက်လို့ရတယ်။ underscore( _ ) လည်းလိုက်လို့ရတယ်။ number တွေနဲ့စပြီးတော့ ပေးလို့မရပါ။ special character တွေပေးလို့မရပါ။ _ နဲ့စပြီးပေးလို့မရဘူး။</p>
<blockquote><p>$name=&#8221;valid&#8221;; //Valid Name</p>
<p>$_name=&#8221;invalid&#8221;; //Invalid Name</p>
<p>$1name=&#8221;invalid&#8221;; //Invalid Name,start with a number</p></blockquote>
<p><strong>Variable Variables</strong></p>
<blockquote><p>$name=&#8217;foo&#8217;;</p>
<p>$$name=&#8217;bar&#8217;;</p>
<p>$echo $foo;</p>
<p>//Display &#8216;bar&#8217;</p></blockquote>
<p>$$ သုံးလိုက်တဲ့အတွက် $name ရဲ့ foo က variable ဖြစ်သွားတယ်။</p>
<blockquote><p>$name=&#8217;123&#8242;; // 123 is your variable name, this would normally be invalid.</p>
<p>$$name=&#8217;456&#8242;; // Assign, you assign a value</p>
<p>echo ${&#8217;123&#8242;};</p>
<p>//Finally, using curly braces you can output 456</p></blockquote>
<p>variable ကလည်း function ဖြစ်နိုင်တယ်။</p>
<blockquote><p>function myFunc()</p>
<p>{</p>
<p>echo &#8220;myFunc&#8221;;</p>
<p>}</p>
<p>$f=&#8217;myFunc&#8217;;</p>
<p>$f(); //wil call myFunc();</p></blockquote>
<p><strong>Determining If a Variable Exists</strong></p>
<p>Variable ရှိမရှိ စစ်မယ်ဆိုရင် isset ဆိုတာနဲ့ စစ်လို့ရတယ်။ boolean return ပြန်တယ်။ ရှိရင်1 လို့ ပြန်တယ်။</p>
<blockquote><p>echo isset($x);</p></blockquote>
</span>]]></content:encoded>
			<wfw:commentRss>http://www.saturngod.net/knowledgebase/short-note-of-php-2/feed</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Shortest URL</title>
		<link>http://www.saturngod.net/our-site/shortest-url?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=shortest-url</link>
		<comments>http://www.saturngod.net/our-site/shortest-url#comments</comments>
		<pubDate>Tue, 14 Jul 2009 09:14:13 +0000</pubDate>
		<dc:creator>saturngod</dc:creator>
				<category><![CDATA[Our Site]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[jquery]]></category>

		<guid isPermaLink="false">http://www.saturngod.net/?p=1503</guid>
		<description><![CDATA[bit.ly နဲ့ tinyurl တို့ရဲ့ service ကိုယူပြီးပြန်ရေးထားတယ်။ မူရင်း site ထက် မြန်တာပေါ့။ ဘာလို့လည်းဆိုတော့ ဘာပုံမှ မပါလို့ပဲဗျ။ ကျွန်တော် bit.ly မှာ ဆို ကြာတယ်လို့ထင်ရတယ်။ သူ့ ပုံတွေ loading လုပ်နေတာကြောင့်လည်းပါတယ်။ အဲဒါကြောင့် ကိုယ့်ဘာသာကိုယ် သုံးဖို့အတွက် ရေးထားတာပါ။ PHP code ကိုတော့ http://davidwalsh.name ကနေ ယူပြီး jquery နဲ့ ပေါင်းပြီး ရေးထားတာ။ လိပ်စာကတော့ http://www.saturngod.net/webtool/ အဲ..မေ့တော့မလို့&#8230; HTML5 &#8230; <a href="http://www.saturngod.net/our-site/shortest-url">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<span style="font-family:'Masterpiece Uni Sans',Yunghkio,Myanmar3, Parabaik, Padauk, 'WinUni Innwa', 'Win Uni Innwa', 'MyMyanmar Unicode',Myanmar2;"><p>bit.ly နဲ့ tinyurl တို့ရဲ့ service ကိုယူပြီးပြန်ရေးထားတယ်။ မူရင်း site ထက် မြန်တာပေါ့။ ဘာလို့လည်းဆိုတော့ ဘာပုံမှ မပါလို့ပဲဗျ။ ကျွန်တော် bit.ly မှာ ဆို ကြာတယ်လို့ထင်ရတယ်။ သူ့ ပုံတွေ loading လုပ်နေတာကြောင့်လည်းပါတယ်။ အဲဒါကြောင့် ကိုယ့်ဘာသာကိုယ် သုံးဖို့အတွက် ရေးထားတာပါ။ PHP code ကိုတော့ http://davidwalsh.name ကနေ ယူပြီး jquery နဲ့ ပေါင်းပြီး ရေးထားတာ။ လိပ်စာကတော့</p>
<p>http://www.saturngod.net/webtool/</p>
<p>အဲ..မေ့တော့မလို့&#8230; HTML5 ကိုသုံးထားတော့ firefox3.5 နဲ့ chrome 2 မှာမှ အဆင်ပြေမှာနော်&#8230; <img src='http://www.saturngod.net/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> </p>
</span>]]></content:encoded>
			<wfw:commentRss>http://www.saturngod.net/our-site/shortest-url/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Image Verify</title>
		<link>http://www.saturngod.net/knowledgebase/image-verify?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=image-verify</link>
		<comments>http://www.saturngod.net/knowledgebase/image-verify#comments</comments>
		<pubDate>Tue, 14 Oct 2008 13:43:02 +0000</pubDate>
		<dc:creator>saturngod</dc:creator>
				<category><![CDATA[Knowledgebase]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[security]]></category>

		<guid isPermaLink="false">http://www.saturngod.net/?p=633</guid>
		<description><![CDATA[အင်တာနက်စသုံးကာစက image verify ဘာကြောင့်လုပ်ရတယ်ဆိုတာကို ကောင်းကောင်းနားမလည်ဘူး။ သူငယ်ချင်းတစ်ယောက်ဆိုရင် သူ့မျက်စိကောင်းမကောင်း စစ်တဲ့အနေနဲ့ ထည့်ထားတာလားလို့တောင် ကျွန်တော့်ကို မေးဘူးတယ်။ အခုတလော MZ မှာ ပြသနာတွေ ကြုံတော့မှ ကောင်းကောင်း နားလည်တော့တယ်။ Image Verify ဘာကြောင့်လုပ်ရလဲ။ အဓိက bot ရန်က ကာကွယ်ချင်လို့ပါ။ bot တွေဆိုတာကတော့ လူက ဖန်တီးထားတဲ့ program တစ်ခုပါ။ သူက အလိုအလျောက် site တစ်ခုမှာ register လုပ်မယ်။ ပြီးအဲဒီ site မှာ &#8230; <a href="http://www.saturngod.net/knowledgebase/image-verify">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<span style="font-family:'Masterpiece Uni Sans',Yunghkio,Myanmar3, Parabaik, Padauk, 'WinUni Innwa', 'Win Uni Innwa', 'MyMyanmar Unicode',Myanmar2;"><p>အင်တာနက်စသုံးကာစက image verify ဘာကြောင့်လုပ်ရတယ်ဆိုတာကို ကောင်းကောင်းနားမလည်ဘူး။ သူငယ်ချင်းတစ်ယောက်ဆိုရင် သူ့မျက်စိကောင်းမကောင်း စစ်တဲ့အနေနဲ့ ထည့်ထားတာလားလို့တောင် ကျွန်တော့်ကို မေးဘူးတယ်။ အခုတလော MZ မှာ ပြသနာတွေ ကြုံတော့မှ ကောင်းကောင်း နားလည်တော့တယ်။<br />
<span id="more-633"></span><br />
<strong>Image Verify ဘာကြောင့်လုပ်ရလဲ။</strong></p>
<p>အဓိက bot ရန်က ကာကွယ်ချင်လို့ပါ။ bot တွေဆိုတာကတော့ လူက ဖန်တီးထားတဲ့ program တစ်ခုပါ။ သူက အလိုအလျောက် site တစ်ခုမှာ register လုပ်မယ်။ ပြီးအဲဒီ site မှာ ကြော်ငြာတွေ အလိုအလျောက်တင်သွားမယ်။ ဒါမှမဟုတ် ညစ်ညမ်းပုံတွေ တင်သွားမယ်ပေါ့။ အဲလိုလုပ်ခွင့်မရှိအောင် register လုပ်တဲ့နေရာမှာ image verify လုပ်ထားတာပါ။ bot ဆိုရင်တော့ အဲဒီ image က ပေါ်တဲ့စာကို မဖတ်နိုင်တော့ဘူးလေ။ ဒါကြောင့် ပုံနဲ့ စာတွေကို ဖော်ပြထားရတာပေါ့။ လူကသာ အဲဒီ ပုံက စာကို ဖတ်နိုင်တာပေါ့။ အထူးသဖြင့် forum တွေ blog တွေမှာ image verify ထည့်ထားရတယ်။ နောက်ပြီး comment ရေးတဲ့နေရာတွေမှာလည်း လုံခြုံရေးအရ image verify လုပ်ရတာလေးတွေရှိလာရတာပါ။ အဓိကအားဖြင့်တော့ bot အန္တရာယ်ကို ကာကွယ်ဖို့ပါ။</p>
<p><strong>Image Verify ကို ဘာလို့ ဖတ်ရခက်အောင်လုပ်ထားရတာလဲ။</strong></p>
<p>နည်းပညာတွေမြင့်မားလာတာနဲ့ အမျှ bot တွေကလည်း အဆင့်မြှင့်လာတယ်ဗျ။ image ကို OCR နဲ့ တဆင့်ဖတ်ပြီး form တွေကို ဖြည့်နိုင်စွမ်းရှိလာတယ်။ ဒီတော့ OCR နဲ့လွယ်လွယ်ဖတ်မရအောင်လုပ်ဖို့လိုလာပြီ။ ဒါကြောင့် image တွေက ရွေ့စောင်းနေမယ်။ အရောင်တွေ ရောနေမယ်။ background က ရှုပ်ပွနေပြီး စာသားကို color စုံနဲ့ရေးထားမယ်။ စာတစ်လုံးနဲ့ တစ်လုံး font မတူအောင် လုပ်ထားရတယ်။ ဒါဆိုရင်တော့ OCR နဲ့ဖတ်မရတော့ဘူးလေ။ ဒါကြောင့် image verify က ချက်ခြင်း ကြည့်ရုံနဲ့ ဖတ်မရတာပေါ့။</p>
<p><strong>Image Verify ကိုဘယ်လိုရေးလဲ။</strong></p>
<p>ကျွန်တော်က PHP သမားဖြစ်တဲ့အတွက်ကြောင့် PHP နဲ့ရေးထားတဲ့ code လေးကို <a href="http://www.4shared.com/file/66884053/437a45cc/image_verifytar.html " target="_blank">ဒီမှာ</a> ဆွဲချလိုက်ပါ။ လွယ်လွယ်လေးပါပဲ။ code လေးကို ဖတ်ကြည့်တာနဲ့ ဘယ်လိုရေးထားလဲဆိုတာ သိနိုင်တယ်လေ။ မသိဘူးဆိုရင်တောင် index.php မှာ</p>
<blockquote><p>echo &#8216;Valid&#8217;;</p></blockquote>
<p>ဆိုတဲ့ နေရာမှာ စိတ်ကြိုက် ကိုယ်လိုအပ်တဲ့ code ကိုထည့်သွင်းရေးသားနိုင်တယ်။ အဲ&#8230; အဲဒီ code က ကျွန်တော်ရေးထားတာတော့ မဟုတ်ဘူး။ google ကနေရှာပြီး တွေ့လာတာနော်။ ကျွန်တော်က သူပြောထားတဲ့အတိုင်း အဆင့်ဆင့်လုပ်ပြီး package ပြန်လုပ်ပေးထားတာပဲရှိတာ။</p>
<p><strong>Image Verify နဲ့လုံခြုံမှုရှိလား</strong></p>
<p>register လုပ်တဲ့အပိုင်းတွေမှာတော့ password ကို md5 encryption နဲ့သိမ်းတာအပြင် email confirm တွေပါ ထည့်သွင်းကြပါတယ်။ email confrim က အရေးကြီးပါတယ်။ bot တွေ အများစုက email မရှိပဲနဲ့ register လုပ်ကြပါတယ်။ သူတို့တွေက email ကို စာရင်းလုပ်ထားပြီးတော့ random ခေါက်ပြီးထည့်ပေးတတ်ပါတယ်။ ဒါကြောင့် email confirm က email တကယ်ရှိတဲ့ လူတွေမှသာ confirm လုပ်နိုင်မှာပါ။</p>
</span>]]></content:encoded>
			<wfw:commentRss>http://www.saturngod.net/knowledgebase/image-verify/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PHP Manual</title>
		<link>http://www.saturngod.net/opensource/php/php-manual?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=php-manual</link>
		<comments>http://www.saturngod.net/opensource/php/php-manual#comments</comments>
		<pubDate>Fri, 04 Jul 2008 03:36:45 +0000</pubDate>
		<dc:creator>saturngod</dc:creator>
				<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://saturngod.mysteryzillion.com/?p=122</guid>
		<description><![CDATA[တခြားလူတွေတော့ မသိဘူး.. ကျွန်တော်ကတော့ PHP ရေးမယ်ဆို အရင်တုန်းက online ရှိမှ ရေးလို့ရတယ်။ ဘာဖြစ်လို့လည်းဆိုတော့ http://php.net/manual/en ကနေ လိုချင်တဲ့ code နဲ့ပတ်သက်ပြီး သွားသွားရှာရလို့ပါ။ အမှန်တိုင်းပြောရင် mysql နဲ့ အခုချက်ချင်း ချိတ်ပြဆို ချိတ်ပြဖို့ ခက်ခဲပါတယ်။ manual လေးကို သွားပြီး တစ်ခေါက်ဖတ်ပြီးမှ ရေးနေကြမို့ပါ။ အဲဒီအတွက် သူများတွေမေးရင် ပြန်ဖြေဖို့ မလွယ်ဘူး။ online လည်းတက်ကြည့်လို့မရဘူး။ ဒါကြောင့် php.net က manual ကို website &#8230; <a href="http://www.saturngod.net/opensource/php/php-manual">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<span style="font-family:'Masterpiece Uni Sans',Yunghkio,Myanmar3, Parabaik, Padauk, 'WinUni Innwa', 'Win Uni Innwa', 'MyMyanmar Unicode',Myanmar2;"><p>တခြားလူတွေတော့ မသိဘူး.. ကျွန်တော်ကတော့ PHP ရေးမယ်ဆို အရင်တုန်းက online ရှိမှ ရေးလို့ရတယ်။ ဘာဖြစ်လို့လည်းဆိုတော့ http://php.net/manual/en ကနေ လိုချင်တဲ့ code နဲ့ပတ်သက်ပြီး သွားသွားရှာရလို့ပါ။ အမှန်တိုင်းပြောရင် mysql နဲ့ အခုချက်ချင်း ချိတ်ပြဆို ချိတ်ပြဖို့ ခက်ခဲပါတယ်။<br />
<!--break--><br />
manual လေးကို သွားပြီး တစ်ခေါက်ဖတ်ပြီးမှ ရေးနေကြမို့ပါ။ အဲဒီအတွက် သူများတွေမေးရင် ပြန်ဖြေဖို့ မလွယ်ဘူး။ online လည်းတက်ကြည့်လို့မရဘူး။ ဒါကြောင့် php.net က manual ကို website တစ်ခုလုံး download ဆွဲဖို့ ကြိုးစားသေးတယ်။ နောက်မှ မဖြစ်သေးပါဘူး။ ဘာလို့ online မှာမရှိရမှာလဲဆိုပြီး google ကနေ တက်ရှာလိုက်တော့ ဆိုက်ဆိုက်မြိုက်မြိုက်ကြီးကိုတွေ့ပါတယ်ဗျာ။ http://www.php.net/download-docs.php မှာ manual တစ်ခုလုံးကို download ရယူနိုင်ပါတယ်။ တော်တော်လေးတော့ ဝမ်းသာသွားတာအမှန်ပဲ။ ခက်တာက အကျင့်က အကျင့်ပဲလေ။ google ကနေပဲ သိချင်တဲ့ php code လေးကိုရိုက်ထည့်။ ပြီးရင် php.net/manual/en လေးကို ညွှန်းထားတာလေးကို နှိပ်။ ဒါပေမယ့် အခုတော့ online မရှိလည်း OK သွားပါပြီ။</p>
<p>တကယ်ကောင်းတဲ့ Reference စာအုပ်လေးပါ။ PHP သမားတွေ ဆောင်ထားသင့်ပါတယ်ဗျာ။</p>
</span>]]></content:encoded>
			<wfw:commentRss>http://www.saturngod.net/opensource/php/php-manual/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>regular expression</title>
		<link>http://www.saturngod.net/opensource/php/regular-expression?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=regular-expression</link>
		<comments>http://www.saturngod.net/opensource/php/regular-expression#comments</comments>
		<pubDate>Mon, 30 Jun 2008 06:17:52 +0000</pubDate>
		<dc:creator>saturngod</dc:creator>
				<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://saturngod.mysteryzillion.com/?p=120</guid>
		<description><![CDATA[အခုမှပဲ သိတော့တယ်&#8230; ပထမနှစ်မတိုင်ခင်ကတည်းက regular expression ဆိုတာ သိလာတာ.. နားမလည်ဘူး&#8230; ဒါဆိုရင် နားလည်အောင် ကြိုးစားမလား&#8230; မထင်နဲ့&#8230; ဖတ်ကို မဖတ်တာ&#8230; အဲဒါကြောင့် ထိပြီ&#8230; တကယ်ဗျာ.. တကယ်အသုံးဝင်တဲ့ဟာကို မလေ့လာမိတဲ့အတွက် တော်တော်နောင်တရမိတယ်.. ဘယ်မှာ သုံးရမှန်းမသိ.. ဘယ်လို သုံးရမှန်းမသိတော့ မလိုဘူး.. လိုမှ ရှာမယ်.. ကူးလိုက်မယ်&#8230; အဲလို မှတ်ထားတာ.. ကိုယ်လိုချင်တဲ့ ပုံစံရဖို့ ရေးရတာ တကယ်မလွယ်ဘူးဗျာ.. အခြေခံအားနည်းတာလည်း ပါမှာပေါ့&#8230; ညီအစ်ကိုတို့တွေလည်း လေ့လာထားစေချင်တယ်.. တကယ်ကောင်းပြီး အသုံးတကယ်ဝင်ပါတယ်&#8230; &#8230; <a href="http://www.saturngod.net/opensource/php/regular-expression">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<span style="font-family:'Masterpiece Uni Sans',Yunghkio,Myanmar3, Parabaik, Padauk, 'WinUni Innwa', 'Win Uni Innwa', 'MyMyanmar Unicode',Myanmar2;"><p>အခုမှပဲ သိတော့တယ်&#8230; ပထမနှစ်မတိုင်ခင်ကတည်းက regular expression ဆိုတာ သိလာတာ.. နားမလည်ဘူး&#8230; ဒါဆိုရင် နားလည်အောင် ကြိုးစားမလား&#8230; မထင်နဲ့&#8230; ဖတ်ကို မဖတ်တာ&#8230; အဲဒါကြောင့် ထိပြီ&#8230; တကယ်ဗျာ.. တကယ်အသုံးဝင်တဲ့ဟာကို မလေ့လာမိတဲ့အတွက် တော်တော်နောင်တရမိတယ်.. ဘယ်မှာ သုံးရမှန်းမသိ.. ဘယ်လို သုံးရမှန်းမသိတော့ မလိုဘူး.. လိုမှ ရှာမယ်.. ကူးလိုက်မယ်&#8230; အဲလို မှတ်ထားတာ.. ကိုယ်လိုချင်တဲ့ ပုံစံရဖို့ ရေးရတာ တကယ်မလွယ်ဘူးဗျာ.. အခြေခံအားနည်းတာလည်း ပါမှာပေါ့&#8230; ညီအစ်ကိုတို့တွေလည်း လေ့လာထားစေချင်တယ်.. တကယ်ကောင်းပြီး အသုံးတကယ်ဝင်ပါတယ်&#8230; အထူးသဖြင့် data input validation တွေ replacement တွေမှာ မဖြစ်မနေ သုံးရပါတယ်&#8230; searching တွေမှာလည်း သုံးရပါတယ်&#8230; ကျွန်တော့်လို ပေါ့ပေါ့ဆဆ မလုပ်မိကြပါစေနဲ့ဗျာ&#8230;</p>
</span>]]></content:encoded>
			<wfw:commentRss>http://www.saturngod.net/opensource/php/regular-expression/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

