<?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>Experience Zone</title>
	<atom:link href="http://www.unzeen.com/feed" rel="self" type="application/rss+xml" />
	<link>http://www.unzeen.com</link>
	<description>Share Experience With Respect To FreeBSD/Debian/Ubuntu/PHP/C#/SEO</description>
	<lastBuildDate>Wed, 06 Jan 2010 15:40:07 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.6</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>php อ่าน/เขียน file ได้ในบรรทัดเดียว</title>
		<link>http://www.unzeen.com/archives/705</link>
		<comments>http://www.unzeen.com/archives/705#comments</comments>
		<pubDate>Wed, 06 Jan 2010 15:38:58 +0000</pubDate>
		<dc:creator>LookHin</dc:creator>
				<category><![CDATA[All Categories]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[file_get_contents]]></category>
		<category><![CDATA[file_put_contents]]></category>
		<category><![CDATA[fopen]]></category>
		<category><![CDATA[fread]]></category>

		<guid isPermaLink="false">http://www.unzeen.com/?p=705</guid>
		<description><![CDATA[ปกติเวลาเราจะทำการ เขียนหรืออ่าน file เราจะใช้ function fopen() เพื่อทำการสร้าง pointer ที่จะใช้ในการอ่านและเขียน และจะใช้ function fgets() เพื่ออ่าน และ fwrite() สำหรับเขียน แต่ php ยังมี function file_put_contents() และ file_get_contents() ที่อำนวยความสะดวกในการอ่านและเขียน file ให้ง่ายได้ในบรรทัดเดียว

ขั้นแรกมาดูวิธีการอ่านและเขียน file โดยใช้ function ปกติๆที่เคยๆกันก่อน
# ตัวอย่างการใช้ function fwrite() ในการเขียน file

1
2
3
4
5
6
7
&#60;?php
&#160;
$handle = fopen&#40;&#34;test/log.txt&#34;, &#34;a&#34;&#41;;
fwrite&#40;$handle, &#34;Write To File By PHP&#34;&#41;;
fclose&#40;$handle&#41;;
&#160;
?&#62;

# ตัวอย่างการใช้ function fgets() ในการอ่าน file

1
2
3
4
5
6
7
8
9
10
&#60;?php
&#160;
$handle = fopen&#40;&#34;test/log.txt&#34;, &#34;r&#34;&#41;;
while &#40;!feof&#40;$handle&#41;&#41; &#123;
   [...]]]></description>
		<wfw:commentRss>http://www.unzeen.com/archives/705/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Domain Name บนโลกนี้ใช้ dot (.) อะไรได้บ้าง มาดูกัน</title>
		<link>http://www.unzeen.com/archives/683</link>
		<comments>http://www.unzeen.com/archives/683#comments</comments>
		<pubDate>Mon, 04 Jan 2010 16:58:49 +0000</pubDate>
		<dc:creator>LookHin</dc:creator>
				<category><![CDATA[All Categories]]></category>
		<category><![CDATA[Network]]></category>
		<category><![CDATA[Other]]></category>
		<category><![CDATA[Domain Name]]></category>

		<guid isPermaLink="false">http://www.unzeen.com/?p=683</guid>
		<description><![CDATA[Domain name ที่มีให้ใช้ในโลกนี้ยังมีอีกหลายตัวที่เดียว แล้วแต่ว่าใครจะคิดไปจดไปจอง ซึ่งโดยปกติที่เห็นกันจนชินตาก็มี .com .net .org แต่ก็ยังมี dot อื่นๆ อีกหลายตัวที่น่าสนใจ ถ้าใครดูแล้วเห็น dot อันไหนน่าสนใจ คิดชื่อเท่ๆได้หละก็รีบไปจดไปจองกันไว้เลย ( ดองเอาไว้ก่อนว่างั้น )

แยกตามประเภทหน่วยงาน/องค์กร


gTLD
Entity
Notes


.aero
air-transport industry
Must verify eligibility for registration; only those in various categories of air-travel-related entities may register.


.asia
Asia-Pacific region
This is a TLD for companies, organizations, and individuals based in the region of Asia, Australia, and the Pacific.


.biz
business
This is an [...]]]></description>
		<wfw:commentRss>http://www.unzeen.com/archives/683/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>ajax ของง่ายถ้าใช้ jQuery</title>
		<link>http://www.unzeen.com/archives/669</link>
		<comments>http://www.unzeen.com/archives/669#comments</comments>
		<pubDate>Fri, 04 Dec 2009 03:33:00 +0000</pubDate>
		<dc:creator>LookHin</dc:creator>
				<category><![CDATA[All Categories]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[AJAX]]></category>
		<category><![CDATA[jquery]]></category>

		<guid isPermaLink="false">http://www.unzeen.com/?p=669</guid>
		<description><![CDATA[เมื่อหลายปีก่อนผมเคยเขียนเรืองการใช้งาน ajax เบื่องต้นไปแล้วรอบหนึ่งในเรื่อง &#8220;ใครๆ ก็ ajax มาดูซิมันทำงานยังไง&#8221; โดยเป็นการเขียน script ขึ้นมาใช้งานเองทั้งหมด ซึ่งอาจจะมีข้อจำกัดหลายๆอย่าง และการใช้งานก็ยุ่งยากเพระว่าต้องเรียกใช้ function และส่งค่าต่างๆเองทั้งหมด
แต่เมื่อเวลาผ่านไป ก็ได้มี library หลายๆตัวที่ถูกคิดค้นขึ้นมาเพื่อช่วยให้เราใช้งาน ajax ให้ง่ายขึ้น และตัวที่ผมจะเลือกใช้ก็คือ jQuery พระเอกของเรานี้เอง ซึ่งก็ได้นำไปใช้ในบทความก่อนๆของผมด้วย มันเทพมากๆ

เลิกโม้แล้วก็เข้าเรื่องและดูตัวอย่างกันเลย
อย่างแรกสุดของที่สุด ก็ต้องทำการ download jQuery จาก http://jquery.com/ ซะก่อน
จากนั้นมาสร้าง file ต่างๆเอาไว้ทดสอบตามนี้
ใจร้อนอยากทดสอบก็คลิก http://www.unzeen.com/example/jquery-ajax/ajax-jquery.html
ถ้าขี้เกียจพิมพ์ก็ download  http://www.unzeen.com/example/jquery-ajax/jquery-ajax.zip
# ajax-jquery.html

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
&#60;!DOCTYPE html PUBLIC &#34;-//W3C//DTD XHTML 1.0 Transitional//EN&#34; &#34;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&#34;&#62;
&#60;html xmlns=&#34;http://www.w3.org/1999/xhtml&#34;&#62;
&#60;head&#62;
&#60;meta http-equiv=&#34;Content-Type&#34; content=&#34;text/html; charset=windows-874&#34; /&#62;
&#60;title&#62;ajax ของง่ายถ้าใช้ jQuery&#60;/title&#62;
&#160;
&#60;script type=&#34;text/javascript&#34; src=&#34;js/jquery-1.3.2.min.js&#34;&#62;&#60;/script&#62;
&#60;script type=&#34;text/javascript&#34;&#62;
// ทดสอบการใช้ [...]]]></description>
		<wfw:commentRss>http://www.unzeen.com/archives/669/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>CSSViewer ใครใช้ font ไหน style อะไรก็ไม่รอดสายตาเรา</title>
		<link>http://www.unzeen.com/archives/656</link>
		<comments>http://www.unzeen.com/archives/656#comments</comments>
		<pubDate>Thu, 03 Dec 2009 16:05:33 +0000</pubDate>
		<dc:creator>LookHin</dc:creator>
				<category><![CDATA[All Categories]]></category>
		<category><![CDATA[Software/Tools]]></category>
		<category><![CDATA[Ads-on]]></category>
		<category><![CDATA[firefox]]></category>

		<guid isPermaLink="false">http://www.unzeen.com/?p=656</guid>
		<description><![CDATA[เวลาเปิดเจอเว็บสวยๆเราก็อยากจะรู้หละว่าเค้าใช้ font อะไร สีไหน ขนาดเท่าไร และการจะดูได้ ก็ต้อง view source ซึ่งบ่อยครั้งก็ดูลำบากเหลือเกิน ไหนจะ css อีก ปัญหานี้ช่วยได้ด้วย CSSViewer ซึ่งเป็น ads-on ของ FireFox ไปแอบดูมันหน่อยว่ามันทำอะไรได้บ้าง ตามมา..

ขั้นแรกทำการติดตั้ง CSSViewer กันก่อน โดยเข้าไปที่
https://addons.mozilla.org/en-US/firefox/addon/13357
ติ๊กที่ช่อง Let me install this experimental add-on.
จากนั้นคลิก &#8220;Add to Firefox&#8221; เพื่อทำการติดตั้ง

เมื่อทำการติดตั้งเรียบร้อยแล้ว ทำการปิดและเปิด FireFox ใหม่อีกรอบ เพื่อเอาฤกษ์เอาชัย
จากนั้นเปิดเข้าไปยัง website ที่ต้องการ ของผมก็เข้า http://www.unzeen.com/ ซะเลย
ต่อไป ไปที่ Tools -> CSSViewer

จากนั้นเลือน mouse ไปยังตำแหน่งที่เราต้องการจะดูว่าใช้ CSS อะไรได้เลย

ถ้าต้องการจะปิด ก็ให้เข้าไปที่ Tools -> CSSViewer [...]]]></description>
		<wfw:commentRss>http://www.unzeen.com/archives/656/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>แจกฟรีๆ.. JavaScript:setFormValue() กำหนดค่าได้ไม่ว่า input แบบไหน</title>
		<link>http://www.unzeen.com/archives/620</link>
		<comments>http://www.unzeen.com/archives/620#comments</comments>
		<pubDate>Sun, 11 Oct 2009 12:38:29 +0000</pubDate>
		<dc:creator>LookHin</dc:creator>
				<category><![CDATA[All Categories]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[form]]></category>
		<category><![CDATA[html]]></category>
		<category><![CDATA[input]]></category>
		<category><![CDATA[setFormValue]]></category>

		<guid isPermaLink="false">http://www.unzeen.com/?p=620</guid>
		<description><![CDATA[บางคนอาจจะเคยประสบปัญหาเวลาที่จะต้องทำการกำหนดค่าให้กับ input ต่างๆ ใน html form โดยเฉพาะอย่างยิ่งพวก radio button, select, checkbox ซึ่งหากว่ามีไม่กี่ตัวก็คงไม่ลำบากเท่าไร แต่หากว่ามีเยอะหละก็ความยุงยากก็จะตามมา
ดูตัวอย่างก่อน ได้ที่นี้เลย http://www.unzeen.com/example/setFormValue.html

ต่อไปมาเริ่มดู code ทั้งหมดกันต่อเลยดีกว่า
# setFormValue.html

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
&#160;
&#60;!DOCTYPE HTML PUBLIC &#34;-//W3C//DTD HTML 4.01 Transitional//EN&#34;
&#34;http://www.w3.org/TR/html4/loose.dtd&#34;&#62;
&#60;html&#62;
&#60;head&#62;
&#60;meta http-equiv=&#34;Content-Type&#34; content=&#34;text/html; charset=windows-874&#34;&#62;
&#60;title&#62;JavaScript:setFormValue&#40;&#41;&#60;/title&#62;
&#60;/head&#62;
&#160;
&#60;body&#62;
&#160;
&#60;hr&#62;
&#60;form name=&#34;form1&#34; method=&#34;post&#34; action=&#34;&#34;&#62;
  &#60;input name=&#34;text&#34; type=&#34;text&#34; id=&#34;text&#34;&#62;
  &#60;br&#62;
  &#60;input name=&#34;hiddenField&#34; type=&#34;hidden&#34; value=&#34;&#34;&#62;
  &#60;br&#62;
  &#60;textarea name=&#34;textfield&#34;&#62;&#60;/textarea&#62;
  &#60;br&#62;
  &#60;select name=&#34;multi_select&#34; size=&#34;5&#34; multiple&#62;
  [...]]]></description>
		<wfw:commentRss>http://www.unzeen.com/archives/620/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>jQuery + Validate Plugin เช็คฟอร์มเรื่องง่าย ใครว่ายาก</title>
		<link>http://www.unzeen.com/archives/603</link>
		<comments>http://www.unzeen.com/archives/603#comments</comments>
		<pubDate>Sat, 05 Sep 2009 08:00:11 +0000</pubDate>
		<dc:creator>LookHin</dc:creator>
				<category><![CDATA[All Categories]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[html]]></category>
		<category><![CDATA[jquery]]></category>
		<category><![CDATA[validate form]]></category>

		<guid isPermaLink="false">http://www.unzeen.com/?p=603</guid>
		<description><![CDATA[วันนี้แนะนำการใช้ jQuery + Validate Form Plugin สำหรับการตรวจสอบค่าในฟอร์ม ว่าถูกป้อนข้อมูลเข้ามาครบหรือยังก่อนที่จะทำการกด submit ซึงปกติแล้วเราอาจจะใช้ JavaScript ในการเช็คซึงถ้าเขียนเองก็อาจจะยุ่งยากไปหน่อย แต่ Validate Form Plugin ช่วยเราได้
เริ่มจากการ download jQuery มาก่อน http://www.jquery.com/
จากนั้นก็ download Validate Plugin http://bassistance.de/jquery-plugins/jquery-plugin-validation/

ต่อไปทำการ unzip และนำ jquery-1.3.2.js และ jquery.validate.js ไปไว้ใน folder /js และก็สร้าง file jquery.start.js ขึ้นมาด้วย เพื่อกำหนดค่าเริ่มต้นให้ jQuery ทำงาน โครงมีสร้างของ folder และ file ดังนี้
โครงสร้างของ folder และ file

1
2
3
4
5
- /js/jquery-1.3.2.js
- /js/jquery.validate.js
- /js/jquery.start.js
- /css/custom-styles.css
- /example.html

หรือจะ download file [...]]]></description>
		<wfw:commentRss>http://www.unzeen.com/archives/603/feed</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>jQuery ทำให้ชีวิตนี้ใช้ FCKeditor ได้ง่ายขึ้น</title>
		<link>http://www.unzeen.com/archives/565</link>
		<comments>http://www.unzeen.com/archives/565#comments</comments>
		<pubDate>Sun, 16 Aug 2009 13:06:32 +0000</pubDate>
		<dc:creator>LookHin</dc:creator>
				<category><![CDATA[All Categories]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[FCKeditor]]></category>
		<category><![CDATA[jquery]]></category>

		<guid isPermaLink="false">http://www.unzeen.com/?p=565</guid>
		<description><![CDATA[อย่างแรกทำการ download FCKEditor จาก http://www.fckeditor.net/
จากนั้นทำการ download พระเอกของเรา jQuery จาก http://www.jquery.com/
ขั้นต่อไปทำการ unzip และนำ file ที่ได้ไปไว้ใน folder js (ของคุณจะตั้งเป็นอะไรก็แล้วแต่ แต่ของผม js) จากนั้นทำการลบ file ของ fckeditor ที่ไม่จำเป็นออก หรือถ้าหากไม่แน่ใจว่า file ไหนใช้บ้างไม่ใช้บ้าง ก็เอาไว้ทั้งหมดนั้นหละครับ ไม่เป็นไรไม่ต้องลบออกก็ได้ แต่มันก็จะดูรกๆ ไปหน่อย ไม่ค่อยงามนัก ซึ่งเราชอบแต่ของงามๆ (ไปอ่านต่อข้างใน)

โครงสร้างของ folder ต่างๆ ที่ผมใช้

1
2
3
4
	- /js/jquery-1.3.2.js
	- /js/jquery.start.js
	- /fckeditor/
	- /example.html

- ต่อไปสร้าง file jquery.start.js ใน folder js โดยมีข้อมูลดังนี้

1
2
3
4
5
6
7
8
9
10
11
12
13
// Start
$&#40;document&#41;.ready&#40;function&#40;&#41;&#123;
	// FCKeditor
	$&#40;&#34;textarea.FCKeditor&#34;&#41;.each&#40;function&#40;&#41;&#123;
		var oFCKeditor = new FCKeditor&#40;this.name&#41;;
		oFCKeditor.BasePath	= 'fckeditor/' [...]]]></description>
		<wfw:commentRss>http://www.unzeen.com/archives/565/feed</wfw:commentRss>
		<slash:comments>22</slash:comments>
		</item>
		<item>
		<title>ครั้งแรกกับ Google App Engine เขียนง่ายด้วย Python</title>
		<link>http://www.unzeen.com/archives/543</link>
		<comments>http://www.unzeen.com/archives/543#comments</comments>
		<pubDate>Sat, 11 Jul 2009 05:27:13 +0000</pubDate>
		<dc:creator>LookHin</dc:creator>
				<category><![CDATA[All Categories]]></category>
		<category><![CDATA[Java/Python]]></category>
		<category><![CDATA[Software/Tools]]></category>
		<category><![CDATA[google app engin]]></category>
		<category><![CDATA[python]]></category>

		<guid isPermaLink="false">http://www.unzeen.com/?p=543</guid>
		<description><![CDATA[ขั้นแรกทำการติดตั้งสิ่งที่จำเป็นต้องใช้ซะก่อน
1. Google App Engine SDK เข้าไป download ได้ที่ http://code.google.com/appengine/downloads.html
2. Python เข้าไป download ได้ที่ http://www.python.org/
ควรอ่านให้ดีนะครับว่า Google App Engin Version ที่เรา download ลงมา ต้องใช้กับ Python version อะไร ถ้ามันถามหา version Python 2.5 ก็ต้องเลือก download python version 2.5 นะครับ อย่าทะลึงเอา version ใหม่กว่านั้น เดียวจะใช้งานไม่ได้ (โดนมากับตัว งง อยู่ตั้งนาน)
เมื่อ download ลงมาแล้วก็ทำการติดตั้งให้เรียบร้อย จากนั้นก็มาเริ่มสร้าง application กันเลย

เข้าไปยัง http://appengine.google.com/ จากนั้นทำการ login เข้าระบบ ถ้ายังไม่มี account ก็สมัครก่อนเลย (ตอนนี้ยังฟรี [...]]]></description>
		<wfw:commentRss>http://www.unzeen.com/archives/543/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
