<?xml version="1.0" encoding="UTF-8" ?>
<rss version="2.0">
<channel>
<title><![CDATA[BIWEB开源PHP WMS系统创始人ArthurXF肖飞的blog]]></title> 
<link>http://www.bizeway.net/index.php</link> 
<description><![CDATA[网务通 - 网务公司发展之路]]></description> 
<language>zh-cn</language> 
<copyright><![CDATA[BIWEB开源PHP WMS系统创始人ArthurXF肖飞的blog]]></copyright>
<item>
<link>http://www.bizeway.net/read.php?</link>
<title><![CDATA[Ajax数据传输方式选择——跟着ArthurXF学习Ajax(2)]]></title> 
<author>ArthurXF &lt;arthurxf@gmail.com&gt;</author>
<category><![CDATA[Ajax]]></category>
<pubDate>Sat, 06 Jan 2007 04:32:51 +0000</pubDate> 
<guid>http://www.bizeway.net/read.php?</guid> 
<description>
<![CDATA[ 
	　　上次我教了大家如何选择Ajax类库，这次我们来选择一种安全高效的数据传输方式。<br/>　　Ajax做为服务器异步通信的模式，大大提高了用户体验，可是Ajax传送的数据如何才是安全的，高效的？特别是传送一些敏感信息，如何保护这些信息不被窃取的呢？<br/>　　首先我们来看看Ajax的数据传输原理。<br/>　　Ajax的核心是使用XmlHttpRequest来传输数据的，看看下面的代码，就能更好了解Ajax数据传输方式：<br/><div class="code">function executeXhr(callback, url) {<br/> &nbsp;// branch for native XMLHttpRequest object<br/> &nbsp;if (window.XMLHttpRequest) {<br/> &nbsp; &nbsp;req = new XMLHttpRequest();<br/> &nbsp; &nbsp;req.onreadystatechange = callback;<br/> &nbsp; &nbsp;req.open(&quot;GET&quot;, url, true);<br/> &nbsp; &nbsp;req.send(null);<br/> &nbsp;} // branch for IE/Windows ActiveX version<br/> &nbsp;else if (window.ActiveXObject) {<br/> &nbsp; &nbsp;req = new ActiveXObject(&quot;Microsoft.XMLHTTP&quot;);<br/> &nbsp; &nbsp;if (req) {<br/> &nbsp; &nbsp; &nbsp;req.onreadystatechange = callback;<br/> &nbsp; &nbsp; &nbsp;req.open(&quot;GET&quot;, url, true);<br/> &nbsp; &nbsp; &nbsp;req.send();<br/> &nbsp; &nbsp;}<br/> &nbsp;}<br/>}</div><br/>　　从上面的代码可以看出XmlHttpRequest可以使用我们熟知的GET、POST的方式传输数据，可是Ajax毕竟是客户端程序，使用GET或者POST传输数据并不安全，而且对于大量数据传送，写N条GET、POST,或者频繁发送请求都是不理想的。那么就要使用发送xml数据。<br/>　　不过说真的，因为XML的格式多变，每个人都可以写出N种格式，这样就给XML编码和解析带来了困难，你必须先了解XML的结构才能去编码和解析。所以我本人并不太喜欢XML这样的数据传输格式。<br/><br/><br/>现在ArthurXF本人正在搞PHP等技术培训，如果想学习的人可以跟我联系。另外培训的招生简章在这个网址，想了解的可以去看看。也可以联系我QQ：29011218。<br/><a href="http://www.bizeway.net/read.php/285.htm" target="_blank">PHP培训招生简章</a>
]]>
</description>
</item><item>
<link>http://www.bizeway.net/read.php?&amp;guid=0#topreply</link>
<title><![CDATA[[评论] Ajax数据传输方式选择——跟着ArthurXF学习Ajax(2)]]></title> 
<author> &lt;user@domain.com&gt;</author>
<category><![CDATA[评论]]></category>
<pubDate>Thu, 01 Jan 1970 00:00:00 +0000</pubDate> 
<guid>http://www.bizeway.net/read.php?&amp;guid=0#topreply</guid> 
<description>
<![CDATA[ 
	
]]>
</description>
</item>
</channel>
</rss>