<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://kb.pathosting.co.th/index.php?action=history&amp;feed=atom&amp;title=WWW-Authenticate</id>
	<title>WWW-Authenticate - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://kb.pathosting.co.th/index.php?action=history&amp;feed=atom&amp;title=WWW-Authenticate"/>
	<link rel="alternate" type="text/html" href="https://kb.pathosting.co.th/index.php?title=WWW-Authenticate&amp;action=history"/>
	<updated>2026-05-08T12:58:39Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.39.7</generator>
	<entry>
		<id>https://kb.pathosting.co.th/index.php?title=WWW-Authenticate&amp;diff=296&amp;oldid=prev</id>
		<title>Admin: Created page with &quot;category:PHP  '''HTTP Access Authentication Framework''' เป็นเฟรมเวิร์คในการระบุตัวตนของ HTTP Protocol (RFC 2616...&quot;</title>
		<link rel="alternate" type="text/html" href="https://kb.pathosting.co.th/index.php?title=WWW-Authenticate&amp;diff=296&amp;oldid=prev"/>
		<updated>2010-11-01T18:27:12Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;&lt;a href=&quot;/Category:PHP&quot; title=&quot;Category:PHP&quot;&gt;category:PHP&lt;/a&gt;  &amp;#039;&amp;#039;&amp;#039;HTTP Access Authentication Framework&amp;#039;&amp;#039;&amp;#039; เป็นเฟรมเวิร์คในการระบุตัวตนของ HTTP Protocol (RFC 2616...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;[[category:PHP]]&lt;br /&gt;
&lt;br /&gt;
'''HTTP Access Authentication Framework''' เป็นเฟรมเวิร์คในการระบุตัวตนของ HTTP Protocol (RFC 2616). เราสามารถใช้ฟังก์ชั่น '''[http://php.net/manual/en/function.header.php header]''' ใน php ตามตัวอย่างด้านล่างนี้ เพื่อที่ให้บราวเซอร์แสดงหน้าต่างเพื่อถาม username และ password.&lt;br /&gt;
 header('WWW-Authenticate: Basic realm=&amp;quot;My Realm&amp;quot;');&lt;br /&gt;
 header('HTTP/1.0 401 Unauthorized');&lt;br /&gt;
&lt;br /&gt;
หรือสามารถใช้คำสั่งนี้แบบนี้ เพียงบรรทัดเดียวเพื่อแทนการทำงานของด้านบนได้เลย.&lt;br /&gt;
 header('WWW-Authenticate: Basic realm=&amp;quot;My Realm&amp;quot;',true,401);&lt;br /&gt;
&lt;br /&gt;
ค่าที่พิมพ์เข้ามาสามารถเรียกใช้ได้จากตัวแปร 2 ตัวนี้&lt;br /&gt;
# $_SERVER['PHP_AUTH_USER']&lt;br /&gt;
# $_SERVER['PHP_AUTH_PW']&lt;br /&gt;
&lt;br /&gt;
ยังไม่ได้ลองศึกษาอย่างละเอียด ไว้ถ้ามีโอกาสจะได้ใช้งาน จะศึกษาเพิ่มเติม แล้วมาเขียนอธิบายให้สมบูรณ์&lt;br /&gt;
&lt;br /&gt;
=== ตัวอย่างการแสดงผลใน IE ===&lt;br /&gt;
{{fullurl:Img/2010-11-02_0123.png}}&lt;br /&gt;
&lt;br /&gt;
=== See Also ===&lt;br /&gt;
* http://frontier.userland.com/stories/storyReader$2159&lt;br /&gt;
* http://us3.php.net/features.http-auth (Example #7 Digest HTTP Authentication example น่าสนใจ)&lt;/div&gt;</summary>
		<author><name>Admin</name></author>
	</entry>
</feed>