<?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>epd</title>
	<atom:link href="http://expertduck.com/feed" rel="self" type="application/rss+xml" />
	<link>http://expertduck.com</link>
	<description>/* To be the candle or the mirror that reflects it */</description>
	<lastBuildDate>Tue, 03 Jan 2012 03:08:26 +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>EAS : E-Anti-Spam [wp-plugin]</title>
		<link>http://expertduck.com/free/eas</link>
		<comments>http://expertduck.com/free/eas#comments</comments>
		<pubDate>Tue, 03 Jan 2012 02:52:04 +0000</pubDate>
		<dc:creator>epd</dc:creator>
				<category><![CDATA[Freebies]]></category>
		<category><![CDATA[comment]]></category>
		<category><![CDATA[eas]]></category>
		<category><![CDATA[plugin]]></category>
		<category><![CDATA[spam]]></category>
		<category><![CDATA[wp]]></category>

		<guid isPermaLink="false">http://expertduck.com/?p=642</guid>
		<description><![CDATA[ตอนนี้ผมกำลังทดสอบอยู่นะครับ หลังจากปล่อยให้ spam ถล่มมาหลายวัน จากปกติทั่วไปนิสัยของ spammer มักจะกรอกทุกช่องนั่นเอง(ฮ่าๆ) ว่ากันว่า concept ก็คือสร้าง comment field หลอกเพิ่มมาอีกแล้วซ่อนไม่ให้คนทั่วไปเห็นและกรอกได้(CSS) แล้วก็ตรวจสอบว่าช่องนั้นว่างหรือเปล่า ถ้าไม่ว่างก็เดาได้เลยว่าเป็น spam **ผมลองเอาไปใช้ที่ http://radio.music-parks.com/ ปรากฏว่าได้ผลครับ สำหรับ wp ต้องประยุกต์หน่อยครับ คือลองคิดย้อนกลับกันถ้าผมจะเขียน bot spam สักตัวผมก็ต้อง post field ทั่วไปที่ wp มีให้ นั่นคือ ชื่อ,url,email แล้วก็ comment ใช้มั้ยครับ เมื่อรู้อย่างนี้แล้ว $_POST['comment'] ต้องมีส่งมาแน่ๆ ก็แค่ทำให้มันว่าง = ผ่าน ไม่ว่าง = spam แล้วถึงจะแปลงกลับอีกทีก่อนที่จะ insert ลง db ครับ เกี่ยวกับ plugin ตัวนี้ จากข้างบน ถ้าตรวจสอบไม่ผ่าน [...]]]></description>
		<wfw:commentRss>http://expertduck.com/free/eas/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>i-Mage : Image resizer/Crop</title>
		<link>http://expertduck.com/free/i-mage-image-resizercrop</link>
		<comments>http://expertduck.com/free/i-mage-image-resizercrop#comments</comments>
		<pubDate>Thu, 29 Dec 2011 18:54:42 +0000</pubDate>
		<dc:creator>epd</dc:creator>
				<category><![CDATA[Freebies]]></category>
		<category><![CDATA[crop]]></category>
		<category><![CDATA[image]]></category>
		<category><![CDATA[resizer]]></category>

		<guid isPermaLink="false">http://expertduck.com/?p=636</guid>
		<description><![CDATA[resize/crop คง ratio ไว้ (cropที่ตำแหน่งกลางภาพ) สคริปคล้ายๆ timthumb ครับ Security: ใช้ get_imagesize เช็คไฟล์ มีหรือไม่มีอยู่จริง หรือไม่ใช้รูปภาพ ปกติจะ return false script จะแสดง output 404 ครับ Performance: Client Cache &#8211; มี header Expire ไว้ 1 วัน (สคริปไม่ทำงานซ้ำ สำหรับ รูป/ user นี้ 1 วัน) Server Cache &#8211; ไฟล์ที่ resize+crop แล้วจะถูกแคชไว้ที่ server ทำให้ไม่ต้อง ดึงรูปจริงจาก url มา resize ซ้ำ Usage: &#60;img src=&#34;http://localhost/i-mage.php?{url-รูป}&#34; [...]]]></description>
		<wfw:commentRss>http://expertduck.com/free/i-mage-image-resizercrop/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>AJAX Long Polling</title>
		<link>http://expertduck.com/articles/web-dev/ajax/ajax-long-polling</link>
		<comments>http://expertduck.com/articles/web-dev/ajax/ajax-long-polling#comments</comments>
		<pubDate>Sun, 25 Dec 2011 05:54:46 +0000</pubDate>
		<dc:creator>epd</dc:creator>
				<category><![CDATA[AJAX]]></category>
		<category><![CDATA[chat]]></category>
		<category><![CDATA[long polling]]></category>
		<category><![CDATA[shoutbox]]></category>

		<guid isPermaLink="false">http://expertduck.com/?p=616</guid>
		<description><![CDATA[Long Polling เป็นเทคนิคการเขียน ajax ที่ทำให้ ajax ดู real-time ขึ้น. ในขณะที่การเขียนแบบทั่วไป ajax จะ request/response มาทุกๆ x วินาที (กรณีเป็น chat )แม้ว่าจะไม่มีข้อมูลอัพเดทก็ตาม แต่ Long Polling จะไม่ response กลับมาถ้าหากไม่มีข้อมูลอัพเดท(หรือ ถึงเวลาที่กำหนด) ซึ่ง server จะหน่วงค้างไว้จนกระทั่งมีข้อมูลอัพเดท หรือถึงเวลาที่กำหนด ทำให้ Long Polling ดูเหมือนตอบสนองได้ไวกว่า Simple Long Polling (Server) การเขียน Long Polling (server) สามารถทำได้ง่ายๆ แค่การหน่วง server ไม่ให้จบสคริปในทันที แต่จะรัน(กึ่ง)infinity loop ไปเรื่อยๆ โดยมีการ sleep(หรือ usleep) ไว้ทุกรอบ loop เพื่อไม่ให้ [...]]]></description>
		<wfw:commentRss>http://expertduck.com/articles/web-dev/ajax/ajax-long-polling/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Syntax Highlighter Theme &#8211; Zenburn</title>
		<link>http://expertduck.com/free/syntax-highlighter-theme-zenburn</link>
		<comments>http://expertduck.com/free/syntax-highlighter-theme-zenburn#comments</comments>
		<pubDate>Sat, 24 Dec 2011 02:48:26 +0000</pubDate>
		<dc:creator>epd</dc:creator>
				<category><![CDATA[Freebies]]></category>
		<category><![CDATA[syntaxhighlighter]]></category>
		<category><![CDATA[theme]]></category>
		<category><![CDATA[zenburn]]></category>

		<guid isPermaLink="false">http://expertduck.com/?p=608</guid>
		<description><![CDATA[บังเอินว่าผมชอบ Theme Zenburn ใน Notepad++ มาก แต่ธีมของ Syntax Highlighter มันไม่มีธีมนี้ ก็เลยทำเองมาหยาบๆครับ ชอบก็ลองโหลดไปใช้ดูครับ shThemeZenburn.css &#8211; เอาไปใส่ใน folder styles ของ syntaxhighlighter ครับ shThemeZenburn อีกอัน เป็น Brush สำหรับ php ผมแก้ .js นิดหน่อยเพื่อความสมจริง ฮ่าๆ xD shBrushPhp.js &#8211; เอาไปใส่ใน folder scripts ขอ syntaxhighlighter ครับ shBrushPhp โพสต์ใกล้เคียงNo Related Post]]></description>
		<wfw:commentRss>http://expertduck.com/free/syntax-highlighter-theme-zenburn/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>วิธีป้องกัน CSRF (Cross-Site-Request-Forgery)</title>
		<link>http://expertduck.com/articles/web-dev/php/%e0%b8%a7%e0%b8%b4%e0%b8%98%e0%b8%b5%e0%b8%9b%e0%b9%89%e0%b8%ad%e0%b8%87%e0%b8%81%e0%b8%b1%e0%b8%99-csrf-cross-site-request-forgery</link>
		<comments>http://expertduck.com/articles/web-dev/php/%e0%b8%a7%e0%b8%b4%e0%b8%98%e0%b8%b5%e0%b8%9b%e0%b9%89%e0%b8%ad%e0%b8%87%e0%b8%81%e0%b8%b1%e0%b8%99-csrf-cross-site-request-forgery#comments</comments>
		<pubDate>Fri, 23 Dec 2011 01:00:59 +0000</pubDate>
		<dc:creator>epd</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[security]]></category>
		<category><![CDATA[CSRF]]></category>
		<category><![CDATA[Sea-Surf]]></category>
		<category><![CDATA[session]]></category>
		<category><![CDATA[token]]></category>
		<category><![CDATA[วิธีป้องกัน]]></category>

		<guid isPermaLink="false">http://expertduck.com/?p=599</guid>
		<description><![CDATA[CSRF หรือ Cross Site Request Forgery(เรียกสั้นๆว่าซีเซิร์ฟ Sea-Surf) คือการโจมตีโดยการส่งข้อมูลมาจากที่อื่นที่ไม่ใช่เว็บของเรา ผ่านทาง tag HTML อย่างเช่น &#60;img src=&#34;http://mysite.com/post.php?title=test&#34; /&#62; เป็นต้น หรือการ submit form html ที่ไม่ได้มาจาก website ของเราโดยตรง วิธีการป้องกัน CSRF การป้องกันง่ายที่สุดเลยก็คือการ ตรวจสอบ header referrer ครับ &#60; ? if(empty($_SERVER[&#039;HTTP_REFERRER&#039;]) &#124;&#124; parse_url($_SERVER[&#039;HTTP_REFERRER&#039;],PHP_URL_HOST) != $_SERVER[&#039;HTTP_HOST&#039;])) die(&#039;Huh?&#039;); อีกวิธีนึงหนาแน่นกว่าพอสมควร คือ ให้เราเปิดใช้งาน session แล้ว generate ค่ามาตัวนึงซึ่งไว้ตรวจสอบการ form ที่ส่งมา (ขอเรียกว่า token ละกันครับ) แล้วแทรกค่านี้ไปกับ input form ครับ &#60;? [...]]]></description>
		<wfw:commentRss>http://expertduck.com/articles/web-dev/php/%e0%b8%a7%e0%b8%b4%e0%b8%98%e0%b8%b5%e0%b8%9b%e0%b9%89%e0%b8%ad%e0%b8%87%e0%b8%81%e0%b8%b1%e0%b8%99-csrf-cross-site-request-forgery/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>วิธีป้องกัน session HiJacking</title>
		<link>http://expertduck.com/articles/web-dev/php/%e0%b8%a7%e0%b8%b4%e0%b8%98%e0%b8%b5%e0%b8%9b%e0%b9%89%e0%b8%ad%e0%b8%87%e0%b8%81%e0%b8%b1%e0%b8%99-session-hijacking</link>
		<comments>http://expertduck.com/articles/web-dev/php/%e0%b8%a7%e0%b8%b4%e0%b8%98%e0%b8%b5%e0%b8%9b%e0%b9%89%e0%b8%ad%e0%b8%87%e0%b8%81%e0%b8%b1%e0%b8%99-session-hijacking#comments</comments>
		<pubDate>Fri, 23 Dec 2011 01:00:13 +0000</pubDate>
		<dc:creator>epd</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[security]]></category>
		<category><![CDATA[hijack]]></category>
		<category><![CDATA[session]]></category>
		<category><![CDATA[วิธีป้องกัน]]></category>

		<guid isPermaLink="false">http://expertduck.com/?p=597</guid>
		<description><![CDATA[session HiJacking คือ การขโมย session จาก User มาใช้งานซึ่งผู้ที่ขโมยมามีสิทธิเท่าเทียมหรือเปรียบเสมือนกับ User นั้นๆกันเลยทีเดียว (หาก session Admin โดนขโมยไปนั่นั้นก็เท่ากับว่า เว็บของท่านตกไปอยู่ในเงื้อมมือผู้ไม่หวังดีเข้าให้แล้ว) จริงๆแล้ว การขโมย session น่าจะส่วนหนึ่งของการขโมย cookie มากกว่า(ไม่ขอกล่าวถึงในpost นี้นะครับ) เพราะว่า session_id จะถูกเก็บไว้ใน cookie เหมือนกัน ต่างกันที่ session จะใช้ตัวแปรค่านึงเก็บรหัสไว้แต่ข้อมูลจะอยู่บน server ส่วน cookie จะเก็บข้อมูลไว้ที่ client ลักษณะ cookie ของ session_id จะประมาณว่า PHPSESSID=[0-9a-f]{32} (0 &#8211; 9 และ A-F ฐาน16 จำนวน 32 ตัวอักษร) ซึ่งบางทีจะถูกแนบไปกับ URL แทนที่จะเป็นคุ๊กกี้(ค่อนข้างที่จะอันตราย กรณีที่แชร์ URL [...]]]></description>
		<wfw:commentRss>http://expertduck.com/articles/web-dev/php/%e0%b8%a7%e0%b8%b4%e0%b8%98%e0%b8%b5%e0%b8%9b%e0%b9%89%e0%b8%ad%e0%b8%87%e0%b8%81%e0%b8%b1%e0%b8%99-session-hijacking/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>New Category MyBlog</title>
		<link>http://expertduck.com/blog/new-category-myblog</link>
		<comments>http://expertduck.com/blog/new-category-myblog#comments</comments>
		<pubDate>Thu, 22 Dec 2011 21:18:49 +0000</pubDate>
		<dc:creator>epd</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[ไร้สาระ]]></category>

		<guid isPermaLink="false">http://expertduck.com/?p=594</guid>
		<description><![CDATA[เอิ้ววววว มี category ใหม่แล้วไว้เก็บเรื่องส่วนตัว/ทั่วไป ไร้สาระ กากๆ จะว่าเป็นไดอารี่ก็ได้ครับ และคิดว่า category นี้จะอัพเดทบ่อยที่สุดด้วย ฮ่าๆๆๆ ตั้งแต่ทำเว็บนี้มาเหมือนจะไม่มีที่ให้โพสต์เรื่องไร้สาระเลย (ปกติ จะเอาไอ้ที่ไร้สาระไปแทรกไว้ในสาระ มันเลยกลายเป็น Likeสาระ -*-) จบ โพสต์ใกล้เคียงNo Related Post]]></description>
		<wfw:commentRss>http://expertduck.com/blog/new-category-myblog/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PHP by &amp;Referrence</title>
		<link>http://expertduck.com/articles/web-dev/php/php-by-referrence</link>
		<comments>http://expertduck.com/articles/web-dev/php/php-by-referrence#comments</comments>
		<pubDate>Thu, 22 Dec 2011 19:49:25 +0000</pubDate>
		<dc:creator>epd</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[reference]]></category>

		<guid isPermaLink="false">http://expertduck.com/?p=587</guid>
		<description><![CDATA[เอาสักหน่อยละกันครับ คือผมมีช่วงนึงที่ไม่เข้าใจว่า $test = &#038;test(); หรือ $foo = &$bar; คืออะไร(รู้สึกว่าการเขียนลักษณะนี้จะกลายเป็น trend ไปซะแล้ว) และคิดว่าคงมีอีกหลายคนที่ยังไม่เข้าใจ มาวันนี้ผมจะขออธิบายสั้นๆเพื่อไขข้อสงสัยให้เพื่อนๆได้เข้าใจกันนะครับ ตาม title เลยครับ จากที่กล่าวมา $test = &#038;test(); หรือ $foo = &$bar; จะเห็นว่ามี &#038; มันก็คือ Reference ซึ่งจะคล้ายกับตัวแปร Pointer ในภาษาอื่น (เริ่มgetๆ&#8230;. ) และข้อดีของการใช้ reference ก็คือประหยัดหน่วยความจำ (แต่ใช้เยอะแล้วมึน) เพราะแทนที่ว่าจะ copy ค่าของตัวแปรไปเราก็สามารถใช้ reference แทนได้เลย ตัวอย่าง $foo = 1; $bar = &#38;$foo; $bar++; var_dump($foo,$bar);//foo = 2 ,bar [...]]]></description>
		<wfw:commentRss>http://expertduck.com/articles/web-dev/php/php-by-referrence/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>วิธีเอา stylesheet จาก plugin ออกเฉพาะ theme</title>
		<link>http://expertduck.com/articles/web-dev/wordpress-web-dev/%e0%b8%a7%e0%b8%b4%e0%b8%98%e0%b8%b5%e0%b9%80%e0%b8%ad%e0%b8%b2-stylesheet-%e0%b8%88%e0%b8%b2%e0%b8%81-plugin-%e0%b8%ad%e0%b8%ad%e0%b8%81%e0%b9%80%e0%b8%89%e0%b8%9e%e0%b8%b2%e0%b8%b0-theme</link>
		<comments>http://expertduck.com/articles/web-dev/wordpress-web-dev/%e0%b8%a7%e0%b8%b4%e0%b8%98%e0%b8%b5%e0%b9%80%e0%b8%ad%e0%b8%b2-stylesheet-%e0%b8%88%e0%b8%b2%e0%b8%81-plugin-%e0%b8%ad%e0%b8%ad%e0%b8%81%e0%b9%80%e0%b8%89%e0%b8%9e%e0%b8%b2%e0%b8%b0-theme#comments</comments>
		<pubDate>Thu, 22 Dec 2011 12:22:45 +0000</pubDate>
		<dc:creator>epd</dc:creator>
				<category><![CDATA[WordPress]]></category>
		<category><![CDATA[add_action]]></category>
		<category><![CDATA[functions.php]]></category>
		<category><![CDATA[hook]]></category>

		<guid isPermaLink="false">http://expertduck.com/?p=581</guid>
		<description><![CDATA[เคยใช่ไหมครับแบบว่า stylesheet มันเหมือนจะเกะกะเวลาที่เขียน stylesheet ของ theme เรา ไหนจะต้อง overide css อะไรกันวุ่นอีก (ดีๆไม่ดีต้องใช้ !important &#8211; สำหรับผมแล้วถ้าไม่จำเป็นจะไม่ใช้เลย) ถ้าจะไป disable ในoptionsของ plugin นั้นแล้วธีมอื่นที่ไม่ได้เขียน overide ไว้อีกหละ เพราะฉนั้นถ้าเราเอาออก stylesheet ของ plugin ออกเฉพาะ theme ของเราได้ก็เป็นทางเลือกดีกว่า Functions.php เริ่มที่ไฟล์ funtions.php ใน theme ของเราครับ โดยใช้ function  wp_dequeue_style เอา stylesheet ออกจาก wp_print_styles เลย ง่ายใช่ไหมหละ * plugin จะใช้ wp_enqueue_style ในการแทรก stylesheet * wp_print_styles จะ print styles [...]]]></description>
		<wfw:commentRss>http://expertduck.com/articles/web-dev/wordpress-web-dev/%e0%b8%a7%e0%b8%b4%e0%b8%98%e0%b8%b5%e0%b9%80%e0%b8%ad%e0%b8%b2-stylesheet-%e0%b8%88%e0%b8%b2%e0%b8%81-plugin-%e0%b8%ad%e0%b8%ad%e0%b8%81%e0%b9%80%e0%b8%89%e0%b8%9e%e0%b8%b2%e0%b8%b0-theme/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>evatar &#8211; ปลั๊กอิน proxy avatar</title>
		<link>http://expertduck.com/free/evatar-%e0%b8%9b%e0%b8%a5%e0%b8%b1%e0%b9%8a%e0%b8%81%e0%b8%ad%e0%b8%b4%e0%b8%99-proxy-avatar</link>
		<comments>http://expertduck.com/free/evatar-%e0%b8%9b%e0%b8%a5%e0%b8%b1%e0%b9%8a%e0%b8%81%e0%b8%ad%e0%b8%b4%e0%b8%99-proxy-avatar#comments</comments>
		<pubDate>Tue, 20 Dec 2011 09:23:24 +0000</pubDate>
		<dc:creator>epd</dc:creator>
				<category><![CDATA[Freebies]]></category>
		<category><![CDATA[perfomance]]></category>
		<category><![CDATA[plugin]]></category>

		<guid isPermaLink="false">http://expertduck.com/?p=575</guid>
		<description><![CDATA[ไว้เก็บ + เช็ค avatar จาก gravatar.com ครับ แบบว่าบางทีมันจะเป็น 404 ทำให้เว็บเราเหมือนจะโหลดช้าลง ปลั๊กอินตัวนี้เป็น proxy ไปดึงรูปมาเก็บไว้แล้วแคชไว้1วันครับทำให้รูปที่วิวออกมาจะออกมาจากเว็บเราโดยตรงครับ Plugin Name: evatar Version: 1 Description: gravatar proxy Author: ExpertDuck Plugin URI: http://expertduck.com/ Installation CHMOD 777 folder /req CHMOD 777 folder /avatar activate ใน adminCP ใช้ได้เลยครับ Download: evatar โพสต์ใกล้เคียงEAS : E-Anti-Spam [wp-plugin]]]></description>
		<wfw:commentRss>http://expertduck.com/free/evatar-%e0%b8%9b%e0%b8%a5%e0%b8%b1%e0%b9%8a%e0%b8%81%e0%b8%ad%e0%b8%b4%e0%b8%99-proxy-avatar/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

