<?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>剑气凌人</title>
	<atom:link href="http://zxsv.com/feed" rel="self" type="application/rss+xml" />
	<link>http://zxsv.com</link>
	<description>fire the inspiration</description>
	<lastBuildDate>Thu, 02 Jul 2009 04:29:43 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>2009年签名</title>
		<link>http://zxsv.com/post/281.html</link>
		<comments>http://zxsv.com/post/281.html#comments</comments>
		<pubDate>Thu, 02 Jul 2009 04:27:36 +0000</pubDate>
		<dc:creator>剑气凌人</dc:creator>
				<category><![CDATA[流水帐]]></category>

		<guid isPermaLink="false">http://zxsv.com/?p=281</guid>
		<description><![CDATA[[2009-02-15 22:41]  剑气凌人 &#124; 一个现在人的心，几乎百毒不侵，不易被感动，不易去爱。
[2009-03-27 11:08]  剑气凌人 &#124; 心无需鞘
[2009-03-02 12:54]  剑气凌人 &#124; 你守的是规则，我在乎的只是随心所欲的自由。
[2009-05-26 09:52]  剑气凌人 &#124; 生活没有如果,命中没有注定
[2009-05-12 21:48]  剑气凌人 &#124; 秒速5厘米，心中曾经的清涩
[2009-05-05 20:08]  剑气凌人 &#124; show time
[2009-06-13 09:58]  剑气凌人 &#124; 拔剑四顾心茫然
[2009-06-03 12:24]  剑气凌人 &#124; 在这段生命中，我浪费了6年
QQ
2009-06-28 15:05  围栏里的羊
2009-06-10 23:20  哎，傻姑娘
2009-06-03 14:06  外面的人找不到工作，里面的人招不到要用的人，中国的教育啊
2009-03-29 00:33  平淡如水的日子 
]]></description>
			<content:encoded><![CDATA[<p>[2009-02-15 22:41]  剑气凌人 | 一个现在人的心，几乎百毒不侵，不易被感动，不易去爱。<br />
[2009-03-27 11:08]  剑气凌人 | 心无需鞘<br />
[2009-03-02 12:54]  剑气凌人 | 你守的是规则，我在乎的只是随心所欲的自由。<br />
[2009-05-26 09:52]  剑气凌人 | 生活没有如果,命中没有注定<br />
[2009-05-12 21:48]  剑气凌人 | 秒速5厘米，心中曾经的清涩<br />
[2009-05-05 20:08]  剑气凌人 | show time<br />
[2009-06-13 09:58]  剑气凌人 | 拔剑四顾心茫然<br />
[2009-06-03 12:24]  剑气凌人 | 在这段生命中，我浪费了6年<br />
QQ<br />
2009-06-28 15:05  围栏里的羊<br />
2009-06-10 23:20  哎，傻姑娘<br />
2009-06-03 14:06  外面的人找不到工作，里面的人招不到要用的人，中国的教育啊<br />
2009-03-29 00:33  平淡如水的日子 </p>
]]></content:encoded>
			<wfw:commentRss>http://zxsv.com/post/281.html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>PHP企业级应用之WebService篇(续)</title>
		<link>http://zxsv.com/post/277.html</link>
		<comments>http://zxsv.com/post/277.html#comments</comments>
		<pubDate>Sat, 13 Jun 2009 11:22:58 +0000</pubDate>
		<dc:creator>剑气凌人</dc:creator>
				<category><![CDATA[代码]]></category>

		<guid isPermaLink="false">http://zxsv.com/?p=277</guid>
		<description><![CDATA[[原创，连载请注明来源]
Ping Service，博客程序提供一种通知机制,以便在第一时间将博客的更新信息发布到提供Ping Service服务的网站，写聚合的时候研究了一下
先看标准吧
这是一个标准的Ping Service,用XMLRPC来传数据的，注释写的这么详细，代码说明就不需要了吧，PHP5开启XMLRPC方法
client.php
 
代码:

&#60;?php
$host  = 'zxsv';
$port  = 80;
$rpc_server = '/test/xmlrpc_server.php';
$title = 'zxsv';
$server = 'http://zxsv/test/';
$rss = 'http://zxsv/test/rss.php';
//weblogUpdates.Ping方法
$Ping = xmlrpc_encode_request('weblogUpdates.Ping', array($title, $server ));
//weblogUpdates.extendedPing方法
$extendedPing = xmlrpc_encode_request('weblogUpdates.extendedPing', array($title, $server, $rss ));
//调用rpc_client_call函数把所有请求发送给XML-RPC服务器端后获取信息
$response = rpc_client_call($host, $port, $rpc_server, $Ping);
$split = '&#60;?xml version=&#34;1.0&#34; encoding=&#34;iso-8859-1&#34;?&#62;';
$xml =  explode($split, $response);
$xml = $split . array_pop($xml);
$response = xmlrpc_decode($xml);
//输出从RPC服务器端获取的信息
print_r($response);
/**
* 函数：提供给客户端进行连接XML-RPC服务器端的函数
* 参数：
* $host  需要连接的主机
* $port [...]]]></description>
			<content:encoded><![CDATA[<p><strong>[原创，连载请注明来源]</strong></p>
<p>Ping Service，博客程序提供一种通知机制,以便在第一时间将博客的更新信息发布到提供Ping Service服务的网站，写聚合的时候研究了一下<br />
先看<a href="http://www.google.com/intl/zh-CN/help/blogsearch/pinging_API.html" target="_blank">标准</a>吧<br />
这是一个标准的Ping Service,用XMLRPC来传数据的，注释写的这么详细，代码说明就不需要了吧，PHP5开启XMLRPC方法<br />
client.php</p>
<div><em onclick="copycode($('code0'));"> </em></p>
<h5>代码:</h5>
<pre class="brush: php;">
&lt;?php
$host  = 'zxsv';
$port  = 80;
$rpc_server = '/test/xmlrpc_server.php';
$title = 'zxsv';
$server = 'http://zxsv/test/';
$rss = 'http://zxsv/test/rss.php';
//weblogUpdates.Ping方法
$Ping = xmlrpc_encode_request('weblogUpdates.Ping', array($title, $server ));
//weblogUpdates.extendedPing方法
$extendedPing = xmlrpc_encode_request('weblogUpdates.extendedPing', array($title, $server, $rss ));
//调用rpc_client_call函数把所有请求发送给XML-RPC服务器端后获取信息
$response = rpc_client_call($host, $port, $rpc_server, $Ping);
$split = '&lt;?xml version=&quot;1.0&quot; encoding=&quot;iso-8859-1&quot;?&gt;';
$xml =  explode($split, $response);
$xml = $split . array_pop($xml);
$response = xmlrpc_decode($xml);
//输出从RPC服务器端获取的信息
print_r($response);
/**
* 函数：提供给客户端进行连接XML-RPC服务器端的函数
* 参数：
* $host  需要连接的主机
* $port  连接主机的端口
* $rpc_server XML-RPC服务器端文件
* $request  封装的XML请求信息
* 返回：连接成功成功返回由服务器端返回的XML信息，失败返回false
*/
function rpc_client_call($host, $port, $rpc_server, $request) {
   $fp = fsockopen($host, $port);
   $query = &quot;POST $rpc_server HTTP/1.0\nUser_Agent: XML-RPC Client\nHost: &quot;.$host.&quot;\nContent-Type: text/xml\nContent-Length: &quot;.strlen($request).&quot;\n\n&quot;.$request.&quot;\n&quot;;
   if (!fputs($fp, $query, strlen($query))) {
       $errstr = &quot;Write error&quot;;
       return false;
   }
   $contents = '';
   while (!feof($fp)){
       $contents .= fgets($fp);
   }
   fclose($fp);
   return $contents;
}
?&gt;</pre>
<p><span id="more-277"></span><br />
server.php</p>
<div><em onclick="copycode($('code1'));"> </em></p>
<h5>代码:</h5>
<pre class="brush: php;">
&lt;?php
/**
* 函数：提供给RPC客户端调用的函数
* 参数：
* $method 客户端需要调用的函数
* $params 客户端需要调用的函数的参数数组
* 返回：返回指定调用结果
*/
function rpc_server_extendedping($method, $params) {
    $title = $params[0];
    $server = $params[1];
    $rss = $params[2];
        //中间的判断,成功返回$XML_RPC_String
    $XML_RPC_String = array('flerror'=&gt;false,'message'=&gt;'Thanks for the ping.');
  return $XML_RPC_String;
}
function rpc_server_ping($method, $params) {
    $title = $params[0];
    $server = $params[1];
        //中间的判断,成功返回$XML_RPC_String
    $XML_RPC_String = array('flerror'=&gt;false,'message'=&gt;'Thanks for the ping.');
  return $XML_RPC_String;
}
//产生一个XML-RPC的服务器端
$xmlrpc_server = xmlrpc_server_create();
//注册一个服务器端调用的方法rpc_server，实际指向的是rpc_server_extendedping函数
xmlrpc_server_register_method($xmlrpc_server, &quot;weblogUpdates.extendedPing&quot;, &quot;rpc_server_extendedping&quot;);
xmlrpc_server_register_method($xmlrpc_server, &quot;weblogUpdates.Ping&quot;, &quot;rpc_server_ping&quot;);
//接受客户端POST过来的XML数据
$request = $HTTP_RAW_POST_DATA;
//print_r($request);
//执行调用客户端的XML请求后获取执行结果
$xmlrpc_response = xmlrpc_server_call_method($xmlrpc_server, $request, null);
//把函数处理后的结果XML进行输出
header('Content-Type: text/xml');
echo $xmlrpc_response;
//销毁XML-RPC服务器端资源
xmlrpc_server_destroy($xmlrpc_server);
?&gt;</pre>
</div>
<p>类写的，有BUG</p>
<div><em onclick="copycode($('code2'));"> </em></p>
<h5>代码:</h5>
<pre class="brush: php;">
&lt;?php
class Pings {
    public $xmlrpc_server;
    public $xmlrpc_response;
    public $methodName;
    public function __construct() {
        //产生一个XML-RPC的服务器端
        $this-&gt;xmlrpc_server = xmlrpc_server_create ();
        $this-&gt;run ();
    }

    //注册一个服务器端调用的方法rpc_server，实际指向的是ping函数
    public function rpc_server() {
        $this-&gt;methodName = !$this-&gt;methodName ? 'weblogUpdates.extendedPing':'weblogUpdates.Ping';
        xmlrpc_server_register_method ( $this-&gt;xmlrpc_server, $this-&gt;methodName, array (__CLASS__, &quot;ping&quot;));
    }
        /**
     * 函数：提供给RPC客户端调用的函数
     * 参数：
     * $method 客户端需要调用的函数
     * $params 客户端需要调用的函数的参数数组
     * 返回：返回指定调用结果
     */
    public function ping($method, $params) {
        $this-&gt;title = $params [0];
        $this-&gt;server = $params [1];
        $this-&gt;rss = $params [2];
        $this-&gt;tag = $params [3];
        //$a  = $this-&gt;title ? $this-&gt;update():'';
        $string = array ('flerror' =&gt; false, 'message' =&gt; 'Thanks for the ping.', 'legal' =&gt; &quot;You agree that use of the blueidea.com ping service is governed by the Terms of Use found at www.blueidea.com.&quot; );
        return $string;
    }

    public function update(){
        echo '这里放更新的一些条件';
    }

    public function run() {
        $this-&gt;rpc_server ();
        $request = isset ( $GLOBALS [&quot;HTTP_RAW_POST_DATA&quot;] ) ? file_get_contents ( &quot;php://input&quot; ) : $GLOBALS [&quot;HTTP_RAW_POST_DATA&quot;];
        $this-&gt;xmlrpc_response = xmlrpc_server_call_method ( $this-&gt;xmlrpc_server, $request, null );
        //把函数处理后的结果XML进行输出
        header ( 'Content-Type: text/xml' );
        echo $this-&gt;xmlrpc_response;
    }

    //销毁XML-RPC服务器端资源
    public function __destruct() {
        xmlrpc_server_destroy ( $this-&gt;xmlrpc_server );
    }
}
$Obj = new Pings ( );
?&gt;</pre>
<p>WebService的最常用的两种方法算是写齐了</p></div>
]]></content:encoded>
			<wfw:commentRss>http://zxsv.com/post/277.html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>PHP之TEA算法实现</title>
		<link>http://zxsv.com/post/276.html</link>
		<comments>http://zxsv.com/post/276.html#comments</comments>
		<pubDate>Sun, 17 May 2009 10:04:06 +0000</pubDate>
		<dc:creator>剑气凌人</dc:creator>
				<category><![CDATA[代码]]></category>

		<guid isPermaLink="false">http://zxsv.com/?p=276</guid>
		<description><![CDATA[算法简单,而且效率高,每次可以操作8个字节的数据,加密解密的KEY为16字节,即包含4个int数据的int型数组,加密轮数应为8的倍数,一般比较常用的轮数为64,32,16,QQ原来就是用TEA16来还原密码的.
TEA算法
核心为

#include &#60;stdint.h&#62;

void encrypt (uint32_t* v, uint32_t* k) {
    uint32_t v0=v[0], v1=v[1], sum=0, i;           /* set up */
    uint32_t delta=0x9e3779b9;                     [...]]]></description>
			<content:encoded><![CDATA[<p>算法简单,而且效率高,每次可以操作8个字节的数据,加密解密的KEY为16字节,即包含4个int数据的int型数组,加密轮数应为8的倍数,一般比较常用的轮数为64,32,16,QQ原来就是用TEA16来还原密码的.</p>
<p><a href="http://en.wikipedia.org/wiki/Tiny_Encryption_Algorithm" target="_blank">TEA算法</a><br />
核心为</p>
<pre class="brush: c;">
#include &lt;stdint.h&gt;

void encrypt (uint32_t* v, uint32_t* k) {
    uint32_t v0=v[0], v1=v[1], sum=0, i;           /* set up */
    uint32_t delta=0x9e3779b9;                     /* a key schedule constant */
    uint32_t k0=k[0], k1=k[1], k2=k[2], k3=k[3];   /* cache key */
    for (i=0; i &lt; 32; i++) {                       /* basic cycle start */
        sum += delta;
        v0 += ((v1&lt;&lt;4) + k0) ^ (v1 + sum) ^ ((v1&gt;&gt;5) + k1);
        v1 += ((v0&lt;&lt;4) + k2) ^ (v0 + sum) ^ ((v0&gt;&gt;5) + k3);
    }                                              /* end cycle */
    v[0]=v0; v[1]=v1;
}

void decrypt (uint32_t* v, uint32_t* k) {
    uint32_t v0=v[0], v1=v[1], sum=0xC6EF3720, i;  /* set up */
    uint32_t delta=0x9e3779b9;                     /* a key schedule constant */
    uint32_t k0=k[0], k1=k[1], k2=k[2], k3=k[3];   /* cache key */
    for (i=0; i&lt;32; i++) {                         /* basic cycle start */
        v1 -= ((v0&lt;&lt;4) + k2) ^ (v0 + sum) ^ ((v0&gt;&gt;5) + k3);
        v0 -= ((v1&lt;&lt;4) + k0) ^ (v1 + sum) ^ ((v1&gt;&gt;5) + k1);
        sum -= delta;
    }                                              /* end cycle */
    v[0]=v0; v[1]=v1;
}
</pre>
<p><span id="more-276"></span><br />
PHP部分代码非我原创，大家可以了解一下这方面的知识</p>
<pre class="brush: php;">
&lt;?php
$date = '8345354023476-3434';
$key = '12345';

$t = new tea ( );
$tea = $t-&gt;encrypt ( $date, $key );
$eetea = $t-&gt;decrypt ( $tea, $key );

var_dump ( $tea );
var_dump ( $eetea );
class tea {
	private $a, $b, $c, $d;
	private $n_iter;
	public function __construct() {
		$this-&gt;setIter ( 32 );
	}

	private function setIter($n_iter) {
		$this-&gt;n_iter = $n_iter;
	}

	private function getIter() {
		return $this-&gt;n_iter;
	}

	public function encrypt($data, $key) {
		// resize data to 32 bits (4 bytes)
		$n = $this-&gt;_resize ( $data, 4 );

		// convert data to long
		$data_long [0] = $n;
		$n_data_long = $this-&gt;_str2long ( 1, $data, $data_long );

		// resize data_long to 64 bits (2 longs of 32 bits)
		$n = count ( $data_long );
		if (($n &amp; 1) == 1) {
			$data_long [$n] = chr ( 0 );
			$n_data_long ++;
		}

		// resize key to a multiple of 128 bits (16 bytes)
		$this-&gt;_resize ( $key, 16, true );
		if ('' == $key)
			$key = '0000000000000000';

		// convert key to long
		$n_key_long = $this-&gt;_str2long ( 0, $key, $key_long );

		// encrypt the long data with the key
		$enc_data = '';
		$w = array (0, 0 );
		$j = 0;
		$k = array (0, 0, 0, 0 );
		for($i = 0; $i &lt; $n_data_long; ++ $i) {
			// get next key part of 128 bits
			if ($j + 4 &lt;= $n_key_long) {
				$k [0] = $key_long [$j];
				$k [1] = $key_long [$j + 1];
				$k [2] = $key_long [$j + 2];
				$k [3] = $key_long [$j + 3];
			} else {
				$k [0] = $key_long [$j % $n_key_long];
				$k [1] = $key_long [($j + 1) % $n_key_long];
				$k [2] = $key_long [($j + 2) % $n_key_long];
				$k [3] = $key_long [($j + 3) % $n_key_long];
			}
			$j = ($j + 4) % $n_key_long;

			$this-&gt;_encipherLong ( $data_long [$i], $data_long [++ $i], $w, $k );

			// append the enciphered longs to the result
			$enc_data .= $this-&gt;_long2str ( $w [0] );
			$enc_data .= $this-&gt;_long2str ( $w [1] );
		}

		return $enc_data;
	}

	public function decrypt($enc_data, $key) {
		// convert data to long
		$n_enc_data_long = $this-&gt;_str2long ( 0, $enc_data, $enc_data_long );

		// resize key to a multiple of 128 bits (16 bytes)
		$this-&gt;_resize ( $key, 16, true );
		if ('' == $key)
			$key = '0000000000000000';

		// convert key to long
		$n_key_long = $this-&gt;_str2long ( 0, $key, $key_long );

		// decrypt the long data with the key
		$data = '';
		$w = array (0, 0 );
		$j = 0;
		$len = 0;
		$k = array (0, 0, 0, 0 );
		$pos = 0;

		for($i = 0; $i &lt; $n_enc_data_long; $i += 2) {
			// get next key part of 128 bits
			if ($j + 4 &lt;= $n_key_long) {
				$k [0] = $key_long [$j];
				$k [1] = $key_long [$j + 1];
				$k [2] = $key_long [$j + 2];
				$k [3] = $key_long [$j + 3];
			} else {
				$k [0] = $key_long [$j % $n_key_long];
				$k [1] = $key_long [($j + 1) % $n_key_long];
				$k [2] = $key_long [($j + 2) % $n_key_long];
				$k [3] = $key_long [($j + 3) % $n_key_long];
			}
			$j = ($j + 4) % $n_key_long;

			$this-&gt;_decipherLong ( $enc_data_long [$i], $enc_data_long [$i + 1], $w, $k );

			// append the deciphered longs to the result data (remove padding)
			if (0 == $i) {
				$len = $w [0];
				if (4 &lt;= $len) {
					$data .= $this-&gt;_long2str ( $w [1] );
				} else {
					$data .= substr ( $this-&gt;_long2str ( $w [1] ), 0, $len % 4 );
				}
			} else {
				$pos = ($i - 1) * 4;
				if ($pos + 4 &lt;= $len) {
					$data .= $this-&gt;_long2str ( $w [0] );

					if ($pos + 8 &lt;= $len) {
						$data .= $this-&gt;_long2str ( $w [1] );
					} elseif ($pos + 4 &lt; $len) {
						$data .= substr ( $this-&gt;_long2str ( $w [1] ), 0, $len % 4 );
					}
				} else {
					$data .= substr ( $this-&gt;_long2str ( $w [0] ), 0, $len % 4 );
				}
			}
		}
		return $data;
	}

	private function _encipherLong($y, $z, &amp;$w, &amp;$k) {
		$sum = ( integer ) 0;
		$delta = 0x9E3779B9;
		$n = ( integer ) $this-&gt;n_iter;

		while ( $n -- &gt; 0 ) {
                       //C v0 += ((v1&lt;&lt;4) + k0) ^ (v1 + sum) ^ ((v1&gt;&gt;5) + k1);
                       //C v1 += ((v0&lt;&lt;4) + k2) ^ (v0 + sum) ^ ((v0&gt;&gt;5) + k3);  

			$sum = $this-&gt;_add ( $sum, $delta );
			$y = $this-&gt;_add ( $y, $this-&gt;_add ( ($z &lt;&lt; 4),$this-&gt;a) ^ $this-&gt;_add($z , $sum) ^ $this-&gt;_add($this-&gt;_rshift ( $z, 5 ), $this-&gt;b )  );
			$z = $this-&gt;_add ( $z, $this-&gt;_add ( ($y &lt;&lt; 4),$this-&gt;a) ^ $this-&gt;_add($y , $sum) ^ $this-&gt;_add($this-&gt;_rshift ( $y, 5 ), $this-&gt;b )  );
		}

		$w [0] = $y;
		$w [1] = $z;
	}

	private function _decipherLong($y, $z, &amp;$w, &amp;$k) {
		// sum = delta&lt;&lt;5, in general sum = delta * n
		$sum = 0xC6EF3720;
		$delta = 0x9E3779B9;
		$n = ( integer ) $this-&gt;n_iter;

		while ( $n -- &gt; 0 ) {
                    //C v1 -= ((v0&lt;&lt;4) + k2) ^ (v0 + sum) ^ ((v0&gt;&gt;5) + k3);
                    //C v0 -= ((v1&lt;&lt;4) + k0) ^ (v1 + sum) ^ ((v1&gt;&gt;5) + k1);
			$z = $this-&gt;_add ( $z, -($this-&gt;_add ( ($y &lt;&lt; 4),$this-&gt;a) ^ $this-&gt;_add($y , $sum) ^ $this-&gt;_add($this-&gt;_rshift ( $y, 5 ), $this-&gt;b ) ) );
			$y = $this-&gt;_add ( $y, - ($this-&gt;_add ( ($z &lt;&lt; 4),$this-&gt;a) ^ $this-&gt;_add($z , $sum) ^ $this-&gt;_add($this-&gt;_rshift ( $z, 5 ), $this-&gt;b ) ) );
			$sum = $this-&gt;_add ( $sum, - $delta );
			}

		$w [0] = $y;
		$w [1] = $z;
	}

	private function _resize(&amp;$data, $size, $nonull = false) {
		$n = strlen ( $data );
		$nmod = $n % $size;
		if (0 == $nmod)
			$nmod = $size;

		if ($nmod &gt; 0) {
			if ($nonull) {
				for($i = $n; $i &lt; $n - $nmod + $size; ++ $i) {
					$data [$i] = $data [$i % $n];
				}
			} else {
				for($i = $n; $i &lt; $n - $nmod + $size; ++ $i) {
					$data [$i] = chr ( 0 );
				}
			}
		}
		return $n;
	}

	private function _hex2bin($str) {
		$len = strlen ( $str );
		return pack ( 'H' . $len, $str );
	}

	private function _str2long($start, &amp;$data, &amp;$data_long) {
		$n = strlen ( $data );

		$tmp = unpack ( 'N*', $data );
		$j = $start;

		foreach ( $tmp as $value )
			$data_long [$j ++] = $value;

		return $j;
	}

	private function _long2str($l) {
		return pack ( 'N', $l );
	}

	private function _rshift($integer, $n) {
		// convert to 32 bits
		if (0xffffffff &lt; $integer || - 0xffffffff &gt; $integer) {
			$integer = fmod ( $integer, 0xffffffff + 1 );
		}

		// convert to unsigned integer
		if (0x7fffffff &lt; $integer) {
			$integer -= 0xffffffff + 1.0;
		} elseif (- 0x80000000 &gt; $integer) {
			$integer += 0xffffffff + 1.0;
		}

		// do right shift
		if (0 &gt; $integer) {
			$integer &amp;= 0x7fffffff; // remove sign bit before shift
			$integer &gt;&gt;= $n; // right shift
			$integer |= 1 &lt;&lt; (31 - $n); // set shifted sign bit
		} else {
			$integer &gt;&gt;= $n; // use normal right shift
		}

		return $integer;
	}

	private function _add($i1, $i2) {
		$result = 0.0;

		foreach ( func_get_args () as $value ) {
			// remove sign if necessary
			if (0.0 &gt; $value) {
				$value -= 1.0 + 0xffffffff;
			}

			$result += $value;
		}

		// convert to 32 bits
		if (0xffffffff &lt; $result || - 0xffffffff &gt; $result) {
			$result = fmod ( $result, 0xffffffff + 1 );
		}

		// convert to signed integer
		if (0x7fffffff &lt; $result) {
			$result -= 0xffffffff + 1.0;
		} elseif (- 0x80000000 &gt; $result) {
			$result += 0xffffffff + 1.0;
		}

		return $result;
	}

// }}}
}

?&gt;
</pre>
<p>上面的是TEA的算法，<a href="http://en.wikipedia.org/wiki/XTEA" target="_blank">XTEA算法为</a></p>
<pre class="brush: c;">
#include &lt;stdint.h&gt;

void encipher(unsigned int num_rounds, uint32_t v[2], uint32_t const k[4]) {
    unsigned int i;
    uint32_t v0=v[0], v1=v[1], sum=0, delta=0x9E3779B9;
    for (i=0; i &lt; num_rounds; i++) {
        v0 += (((v1 &lt;&lt; 4) ^ (v1 &gt;&gt; 5)) + v1) ^ (sum + k[sum &amp; 3]);
        sum += delta;
        v1 += (((v0 &lt;&lt; 4) ^ (v0 &gt;&gt; 5)) + v0) ^ (sum + k[(sum&gt;&gt;11) &amp; 3]);
    }
    v[0]=v0; v[1]=v1;
}

void decipher(unsigned int num_rounds, uint32_t v[2], uint32_t const k[4]) {
    unsigned int i;
    uint32_t v0=v[0], v1=v[1], delta=0x9E3779B9, sum=delta*num_rounds;
    for (i=0; i &lt; num_rounds; i++) {
        v1 ?= (((v0 &lt;&lt; 4) ^ (v0 &gt;&gt; 5)) + v0) ^ (sum + k[(sum&gt;&gt;11) &amp; 3]);
        sum ?= delta;
        v0 ?= (((v1 &lt;&lt; 4) ^ (v1 &gt;&gt; 5)) + v1) ^ (sum + k[sum &amp; 3]);
    }
    v[0]=v0; v[1]=v1;
}
</pre>
<p>那PHP中只需要把运算的位置改下就OK</p>
<pre class="brush: php;">
	private function _teaencipherLong($y, $z, &amp;$w, &amp;$k) {
		$sum = ( integer ) 0;
		$delta = 0x9E3779B9;
		$n = ( integer ) $this-&gt;n_iter;

		while ( $n -- &gt; 0 ) {
			$y = $this-&gt;_add ( $y, $this-&gt;_add ( $z &lt;&lt; 4 ^ $this-&gt;_rshift ( $z, 5 ), $z ) ^ $this-&gt;_add ( $sum, $k [$sum &amp; 3] ) );
			$sum = $this-&gt;_add ( $sum, $delta );
			$z = $this-&gt;_add ( $z, $this-&gt;_add ( $y &lt;&lt; 4 ^ $this-&gt;_rshift ( $y, 5 ), $y ) ^ $this-&gt;_add ( $sum, $k [$this-&gt;_rshift ( $sum, 11 ) &amp; 3] ) );
		}

		$w [0] = $y;
		$w [1] = $z;
	}
	private function _decipherLong($y, $z, &amp;$w, &amp;$k) {
		// sum = delta&lt;&lt;5, in general sum = delta * n
		$sum = 0xC6EF3720;
		$delta = 0x9E3779B9;
		$n = ( integer ) $this-&gt;n_iter;

		while ( $n -- &gt; 0 ) {
			$z = $this-&gt;_add ( $z, - ($this-&gt;_add ( $y &lt;&lt; 4 ^ $this-&gt;_rshift ( $y, 5 ), $y ) ^ $this-&gt;_add ( $sum, $k [$this-&gt;_rshift ( $sum, 11 ) &amp; 3] )) );
			$sum = $this-&gt;_add ( $sum, - $delta );
			$y = $this-&gt;_add ( $y, - ($this-&gt;_add ( $z &lt;&lt; 4 ^ $this-&gt;_rshift ( $z, 5 ), $z ) ^ $this-&gt;_add ( $sum, $k [$sum &amp; 3] )) );
		}

		$w [0] = $y;
		$w [1] = $z;
	}
	</pre>
<p><a href="http://en.wikipedia.org/wiki/XXTEA" target="_blank">XXTEA的算法</a><br />
核心为</p>
<pre class="brush: c;">
 #define MX (z&gt;&gt;5^y&lt;&lt;2) + (y&gt;&gt;3^z&lt;&lt;4)^(sum^y) + (k[p&amp;3^e]^z);

  long btea(long* v, long n, long* k) {
    unsigned long z=v[n-1], y=v[0], sum=0, e, DELTA=0x9e3779b9;
    long p, q ;
    if (n &gt; 1) {          /* Coding Part */
      q = 6 + 52/n;
      while (q-- &gt; 0) {
        sum += DELTA;
        e = (sum &gt;&gt; 2) &amp; 3;
        for (p=0; p&lt;n-1; p++) y = v[p+1], z = v[p] += MX;
        y = v[0];
        z = v[n-1] += MX;
      }
      return 0 ;
    } else if (n &lt; -1) {  /* Decoding Part */
      n = -n;
      q = 6 + 52/n;
      sum = q*DELTA ;
      while (sum != 0) {
        e = (sum &gt;&gt; 2) &amp; 3;
        for (p=n-1; p&gt;0; p--) z = v[p-1], y = v[p] -= MX;
        z = v[n-1];
        y = v[0] -= MX;
        sum -= DELTA;
      }
      return 0;
    }
    return 1;
  }
</pre>
<p>也是运算不一样，这个就不写了，有人已经写过这方面的代码了<br />
<a href="http://test.coolcode.cn/andot/xxtea-encryption-arithmetic-library-in-javascript-and-php/128" target="_blank">地址</a></p>
]]></content:encoded>
			<wfw:commentRss>http://zxsv.com/post/276.html/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>PHP企业级应用之WebService篇</title>
		<link>http://zxsv.com/post/274.html</link>
		<comments>http://zxsv.com/post/274.html#comments</comments>
		<pubDate>Tue, 07 Apr 2009 15:01:54 +0000</pubDate>
		<dc:creator>剑气凌人</dc:creator>
				<category><![CDATA[代码]]></category>

		<guid isPermaLink="false">http://zxsv.com/?p=274</guid>
		<description><![CDATA[企业级应用，主要是讲PHP5对webservice的一些实现(以下的程序可以被JAVA，NET，C等正常调用)
国内用PHP写WebService的真的很少，网上资料也没多少，公司的项目开发过程中，经历了不少这方面的东西，写出来以供大家参考（谢谢老农提供的WSDL和程序文件）
客户端


代码:

&#60;?php
header ( &#34;Content-Type: text/html; charset=utf-8&#34; );
/*
* 指定WebService路径并初始化一个WebService客户端
*/
$ws = &#34;http://soap/soapCspMessage.php?wsdl&#34;;
$client = new SoapClient ( $ws, array ('trace' =&#62; 1, 'uri' =&#62; 'http://www.zxsv.com/SoapDiscovery/' ) );
/*
* 获取SoapClient对象引用的服务所提供的所有方法
*/
echo (&#34;SOAP服务器提供的开放函数:&#34;);
echo ('&#60;pre&#62;');
var_dump ( $client-&#62;__getFunctions () );
echo ('&#60;/pre&#62;');
echo (&#34;SOAP服务器提供的Type:&#34;);
echo ('&#60;pre&#62;');
var_dump ( $client-&#62;__getTypes () );
echo ('&#60;/pre&#62;');
echo (&#34;执行GetGUIDNode的结果:&#34;);
//$users = $client-&#62;GetUsers();
//var_dump($HelloWorld );
$parameters = array('uname'=&#62;'zxsv',&#34;upassword&#34;=&#62;'123');
$out = $client-&#62;HelloWorld($parameters);
$datadb = $out-&#62;HelloWorldResponse;
var_dump($out);
?&#62;

服务端

代码:

&#60;?php
class Member
{
public $UserId;
public $Name;
public function __construct($parmas){
$this-&#62;UserId = $parmas[0];
$this-&#62;Name [...]]]></description>
			<content:encoded><![CDATA[<p>企业级应用，主要是讲PHP5对webservice的一些实现(以下的程序可以被JAVA，NET，C等正常调用)<br />
国内用PHP写WebService的真的很少，网上资料也没多少，公司的项目开发过程中，经历了不少这方面的东西，写出来以供大家参考（谢谢老农提供的WSDL和程序文件）<br />
客户端<br />
<span id="more-274"></span></p>
<div class="blockcode"><em onclick="copycode($('code0'));"></em></p>
<h5>代码:</h5>
<pre class="brush: php;">
&lt;?php
header ( &quot;Content-Type: text/html; charset=utf-8&quot; );
/*
* 指定WebService路径并初始化一个WebService客户端
*/
$ws = &quot;http://soap/soapCspMessage.php?wsdl&quot;;
$client = new SoapClient ( $ws, array ('trace' =&gt; 1, 'uri' =&gt; 'http://www.zxsv.com/SoapDiscovery/' ) );
/*
* 获取SoapClient对象引用的服务所提供的所有方法
*/
echo (&quot;SOAP服务器提供的开放函数:&quot;);
echo ('&lt;pre&gt;');
var_dump ( $client-&gt;__getFunctions () );
echo ('&lt;/pre&gt;');
echo (&quot;SOAP服务器提供的Type:&quot;);
echo ('&lt;pre&gt;');
var_dump ( $client-&gt;__getTypes () );
echo ('&lt;/pre&gt;');
echo (&quot;执行GetGUIDNode的结果:&quot;);
//$users = $client-&gt;GetUsers();
//var_dump($HelloWorld );
$parameters = array('uname'=&gt;'zxsv',&quot;upassword&quot;=&gt;'123');
$out = $client-&gt;HelloWorld($parameters);
$datadb = $out-&gt;HelloWorldResponse;
var_dump($out);
?&gt;</pre>
</div>
<p>服务端</p>
<div class="blockcode"><em onclick="copycode($('code1'));"></em></p>
<h5>代码:</h5>
<pre class="brush: php;">
&lt;?php
class Member
{
public $UserId;
public $Name;
public function __construct($parmas){
$this-&gt;UserId = $parmas[0];
$this-&gt;Name = $parmas[1];
}
}
$servidorSoap = new SoapServer('testphp.xml',array('uri' =&gt; 'http://www.TestPHP.com/','encoding'=&gt;'utf-8','soap_version' =&gt; SOAP_1_2 ));
$servidorSoap-&gt;setClass(Testphp);
$servidorSoap-&gt;handle();
class Testphp {
public function HelloWorld($uid){
return array('HelloWorldResult'=&gt;&quot;mystring&quot;.$uid-&gt;{'uname'}.' and '.$uid-&gt;{'upassword'});
}
public function GetMember($uid){
$s=array();
for($i=0;$i&lt;$uid-&gt;{'uid'};$i++){
$s[] =&amp;amp;new Member(array($i, $uid-&gt;{'uname'}.'我测试'.$i));
}
return   array('GetMemberResult'=&gt;$s);
}
}
?&gt;</pre>
</div>
<p>到这里应该都看的懂吧<br />
下面是WSDL文件</p>
<div class="blockcode"><em onclick="copycode($('code2'));"></em></p>
<h5>代码:</h5>
<pre class="brush: xml;">
&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;
&lt;wsdl:definitions xmlns:soap=&quot;http://schemas.xmlsoap.org/wsdl/soap/&quot; xmlns:tm=&quot;http://microsoft.com/wsdl/mime/textMatching/&quot; xmlns:soapenc=&quot;http://schemas.xmlsoap.org/soap/encoding/&quot; xmlns:mime=&quot;http://schemas.xmlsoap.org/wsdl/mime/&quot; xmlns:tns=&quot;http://www.TestPHP.com/&quot; xmlns:s=&quot;http://www.w3.org/2001/XMLSchema&quot; xmlns:soap12=&quot;http://schemas.xmlsoap.org/wsdl/soap12/&quot; xmlns:http=&quot;http://schemas.xmlsoap.org/wsdl/http/&quot; targetNamespace=&quot;http://www.TestPHP.com/&quot; xmlns:wsdl=&quot;http://schemas.xmlsoap.org/wsdl/&quot;&gt;
&lt;wsdl:types&gt;
&lt;s:schema elementFormDefault=&quot;qualified&quot; targetNamespace=&quot;http://www.TestPHP.com/&quot;&gt;
&lt;s:element name=&quot;HelloWorld&quot;&gt;
&lt;s:complexType&gt;
&lt;s:sequence&gt;
&lt;s:element minOccurs=&quot;0&quot; maxOccurs=&quot;1&quot; name=&quot;uname&quot; type=&quot;s:string&quot; /&gt;
&lt;s:element minOccurs=&quot;0&quot; maxOccurs=&quot;1&quot; name=&quot;upassword&quot; type=&quot;s:string&quot; /&gt;
&lt;/s:sequence&gt;
&lt;/s:complexType&gt;
&lt;/s:element&gt;
&lt;s:element name=&quot;HelloWorldResponse&quot;&gt;
&lt;s:complexType&gt;
&lt;s:sequence&gt;
&lt;s:element minOccurs=&quot;0&quot; maxOccurs=&quot;1&quot; name=&quot;HelloWorldResult&quot; type=&quot;s:string&quot; /&gt;
&lt;/s:sequence&gt;
&lt;/s:complexType&gt;
&lt;/s:element&gt;
&lt;s:element name=&quot;GetMember&quot;&gt;
&lt;s:complexType&gt;
&lt;s:sequence&gt;
&lt;s:element minOccurs=&quot;1&quot; maxOccurs=&quot;1&quot; name=&quot;uid&quot; type=&quot;s:int&quot; /&gt;
&lt;s:element minOccurs=&quot;0&quot; maxOccurs=&quot;1&quot; name=&quot;uname&quot; type=&quot;s:string&quot; /&gt;
&lt;/s:sequence&gt;
&lt;/s:complexType&gt;
&lt;/s:element&gt;
&lt;s:element name=&quot;GetMemberResponse&quot;&gt;
&lt;s:complexType&gt;
&lt;s:sequence&gt;
&lt;s:element minOccurs=&quot;0&quot; maxOccurs=&quot;1&quot; name=&quot;GetMemberResult&quot; type=&quot;tns:ArrayOfMember&quot; /&gt;
&lt;/s:sequence&gt;
&lt;/s:complexType&gt;
&lt;/s:element&gt;
&lt;s:complexType name=&quot;ArrayOfMember&quot;&gt;
&lt;s:sequence&gt;
&lt;s:element minOccurs=&quot;0&quot; maxOccurs=&quot;unbounded&quot; name=&quot;Member&quot; nillable=&quot;true&quot; type=&quot;tns:Member&quot; /&gt;
&lt;/s:sequence&gt;
&lt;/s:complexType&gt;
&lt;s:complexType name=&quot;Member&quot;&gt;
&lt;s:sequence&gt;
&lt;s:element minOccurs=&quot;1&quot; maxOccurs=&quot;1&quot; name=&quot;UserId&quot; type=&quot;s:int&quot; /&gt;
&lt;s:element minOccurs=&quot;0&quot; maxOccurs=&quot;1&quot; name=&quot;Name&quot; type=&quot;s:string&quot; /&gt;
&lt;/s:sequence&gt;
&lt;/s:complexType&gt;
&lt;/s:schema&gt;
&lt;/wsdl:types&gt;
&lt;wsdl:message name=&quot;HelloWorldSoapIn&quot;&gt;
&lt;wsdl:part name=&quot;parameters&quot; element=&quot;tns:HelloWorld&quot; /&gt;
&lt;/wsdl:message&gt;
&lt;wsdl:message name=&quot;HelloWorldSoapOut&quot;&gt;
&lt;wsdl:part name=&quot;parameters&quot; element=&quot;tns:HelloWorldResponse&quot; /&gt;
&lt;/wsdl:message&gt;
&lt;wsdl:message name=&quot;GetMemberSoapIn&quot;&gt;
&lt;wsdl:part name=&quot;parameters&quot; element=&quot;tns:GetMember&quot; /&gt;
&lt;/wsdl:message&gt;
&lt;wsdl:message name=&quot;GetMemberSoapOut&quot;&gt;
&lt;wsdl:part name=&quot;parameters&quot; element=&quot;tns:GetMemberResponse&quot; /&gt;
&lt;/wsdl:message&gt;
&lt;wsdl:portType name=&quot;TestPHPSoap&quot;&gt;
&lt;wsdl:operation name=&quot;HelloWorld&quot;&gt;
&lt;wsdl:input message=&quot;tns:HelloWorldSoapIn&quot; /&gt;
&lt;wsdl:output message=&quot;tns:HelloWorldSoapOut&quot; /&gt;
&lt;/wsdl:operation&gt;
&lt;wsdl:operation name=&quot;GetMember&quot;&gt;
&lt;wsdl:input message=&quot;tns:GetMemberSoapIn&quot; /&gt;
&lt;wsdl:output message=&quot;tns:GetMemberSoapOut&quot; /&gt;
&lt;/wsdl:operation&gt;
&lt;/wsdl:portType&gt;
&lt;wsdl:binding name=&quot;TestPHPSoap&quot; type=&quot;tns:TestPHPSoap&quot;&gt;
&lt;soap:binding transport=&quot;http://schemas.xmlsoap.org/soap/http&quot; /&gt;
&lt;wsdl:operation name=&quot;HelloWorld&quot;&gt;
&lt;soap:operation soapAction=&quot;http://www.TestPHP.com/HelloWorld&quot;   /&gt;
&lt;wsdl:input&gt;
&lt;soap:body use=&quot;literal&quot; /&gt;
&lt;/wsdl:input&gt;
&lt;wsdl:output&gt;
&lt;soap:body use=&quot;literal&quot; /&gt;
&lt;/wsdl:output&gt;
&lt;/wsdl:operation&gt;
&lt;wsdl:operation name=&quot;GetMember&quot;&gt;
&lt;soap:operation soapAction=&quot;http://www.TestPHP.com/GetMember&quot;  /&gt;
&lt;wsdl:input&gt;
&lt;soap:body use=&quot;literal&quot; /&gt;
&lt;/wsdl:input&gt;
&lt;wsdl:output&gt;
&lt;soap:body use=&quot;literal&quot; /&gt;
&lt;/wsdl:output&gt;
&lt;/wsdl:operation&gt;
&lt;/wsdl:binding&gt;
&lt;wsdl:binding name=&quot;TestPHPSoap12&quot; type=&quot;tns:TestPHPSoap&quot;&gt;
&lt;soap12:binding transport=&quot;http://schemas.xmlsoap.org/soap/http&quot; /&gt;
&lt;wsdl:operation name=&quot;HelloWorld&quot;&gt;
&lt;soap12:operation soapAction=&quot;http://www.TestPHP.com/HelloWorld&quot;  /&gt;
&lt;wsdl:input&gt;
&lt;soap12:body use=&quot;literal&quot; /&gt;
&lt;/wsdl:input&gt;
&lt;wsdl:output&gt;
&lt;soap12:body use=&quot;literal&quot; /&gt;
&lt;/wsdl:output&gt;
&lt;/wsdl:operation&gt;
&lt;wsdl:operation name=&quot;GetMember&quot;&gt;
&lt;soap12:operation soapAction=&quot;http://www.TestPHP.com/GetMember&quot;  /&gt;
&lt;wsdl:input&gt;
&lt;soap12:body use=&quot;literal&quot; /&gt;
&lt;/wsdl:input&gt;
&lt;wsdl:output&gt;
&lt;soap12:body use=&quot;literal&quot; /&gt;
&lt;/wsdl:output&gt;
&lt;/wsdl:operation&gt;
&lt;/wsdl:binding&gt;
&lt;wsdl:service name=&quot;TestPHP&quot;&gt;
&lt;wsdl:port name=&quot;TestPHPSoap&quot; binding=&quot;tns:TestPHPSoap&quot;&gt;
&lt;soap:address location=&quot;http://soap/goodwsdl/testphp.php&quot; /&gt;
&lt;/wsdl:port&gt;
&lt;wsdl:port name=&quot;TestPHPSoap12&quot; binding=&quot;tns:TestPHPSoap12&quot;&gt;
&lt;soap12:address location=&quot;http://soap/goodwsdl/testphp.php&quot; /&gt;
&lt;/wsdl:port&gt;
&lt;/wsdl:service&gt;
&lt;/wsdl:definitions&gt;</pre>
</div>
<p>这里有返回的两个字段，一个是返回字符串，这个很好理解</p>
<pre class="brush: xml;">
&lt;s:element name=&quot;HelloWorld&quot;&gt;
&lt;s:complexType&gt;
&lt;s:sequence&gt;
&lt;s:element minOccurs=&quot;0&quot; maxOccurs=&quot;1&quot; name=&quot;uname&quot; type=&quot;s:string&quot; /&gt;
&lt;s:element minOccurs=&quot;0&quot; maxOccurs=&quot;1&quot; name=&quot;upassword&quot; type=&quot;s:string&quot; /&gt;
&lt;/s:sequence&gt;
&lt;/s:complexType&gt;
&lt;/s:element&gt;
&lt;s:element name=&quot;HelloWorldResponse&quot;&gt;
&lt;s:complexType&gt;
&lt;s:sequence&gt;
&lt;s:element minOccurs=&quot;0&quot; maxOccurs=&quot;1&quot; name=&quot;HelloWorldResult&quot; type=&quot;s:string&quot; /&gt;
&lt;/s:sequence&gt;
&lt;/s:complexType&gt;
&lt;/s:element&gt;
</pre>
<p>这一段就字符串的<br />
那返回数组的就比较麻烦了，我和老农搞了一两周才发现是WSDL文件写错了，看下面的一段</p>
<pre class="brush: xml;">
&lt;s:element name=&quot;GetMember&quot;&gt;
&lt;s:complexType&gt;
&lt;s:sequence&gt;
&lt;s:element minOccurs=&quot;1&quot; maxOccurs=&quot;1&quot; name=&quot;uid&quot; type=&quot;s:int&quot; /&gt;
&lt;s:element minOccurs=&quot;0&quot; maxOccurs=&quot;1&quot; name=&quot;uname&quot; type=&quot;s:string&quot; /&gt;
&lt;/s:sequence&gt;
&lt;/s:complexType&gt;
&lt;/s:element&gt;
&lt;s:element name=&quot;GetMemberResponse&quot;&gt;
&lt;s:complexType&gt;
&lt;s:sequence&gt;
&lt;s:element minOccurs=&quot;0&quot; maxOccurs=&quot;1&quot; name=&quot;GetMemberResult&quot; type=&quot;tns:ArrayOfMember&quot; /&gt;
&lt;/s:sequence&gt;
&lt;/s:complexType&gt;
&lt;/s:element&gt;
&lt;s:complexType name=&quot;ArrayOfMember&quot;&gt;
&lt;s:sequence&gt;
&lt;s:element minOccurs=&quot;0&quot; maxOccurs=&quot;unbounded&quot; name=&quot;Member&quot; nillable=&quot;true&quot; type=&quot;tns:Member&quot; /&gt;
&lt;/s:sequence&gt;
&lt;/s:complexType&gt;
&lt;s:complexType name=&quot;Member&quot;&gt;
&lt;s:sequence&gt;
&lt;s:element minOccurs=&quot;1&quot; maxOccurs=&quot;1&quot; name=&quot;UserId&quot; type=&quot;s:int&quot; /&gt;
&lt;s:element minOccurs=&quot;0&quot; maxOccurs=&quot;1&quot; name=&quot;Name&quot; type=&quot;s:string&quot; /&gt;
&lt;/s:sequence&gt;
&lt;/s:complexType&gt;
</pre>
<p>第一段GetMember是输入，最重要的是GetMemberResponse这段，看type=&#8221;tns:ArrayOfMember&#8221;这里，返回一 个数组，WSDL中定义了ArrayOf这个，后面的就简单了，ArrayOfMember的类型是type=&#8221;tns:Member&#8221; ，从name=&#8221;Member&#8221;得到要返回的数组，完工。</p>
]]></content:encoded>
			<wfw:commentRss>http://zxsv.com/post/274.html/feed</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>刚封装的一个PDO类</title>
		<link>http://zxsv.com/post/271.html</link>
		<comments>http://zxsv.com/post/271.html#comments</comments>
		<pubDate>Wed, 01 Apr 2009 05:24:25 +0000</pubDate>
		<dc:creator>剑气凌人</dc:creator>
				<category><![CDATA[代码]]></category>

		<guid isPermaLink="false">http://zxsv.com/?p=271</guid>
		<description><![CDATA[写自己框架时封装的一个PDO类，例子看test.php，MYSQLi的等等再说，别说PDO是已经封装好了的话，多种环境统一的代码风格很重要

代码:

&#60;?php
update($table,$args,$condition);
print_r($db-&#38;gt;fetAll('test',$condition = '',$sort = '',$limit = '5',$field = '*'));
print_r($db-&#38;gt;fetOne('test',$condition = null,$field = '*'));
print_r($db-&#38;gt;execute('update test set title=&#34;24234&#34; where id=1'));
print_r($db-&#38;gt;getRow('select count(*) from test'));*/
print_r($db-&#38;gt;getOne('select * from test'));
print_r($db-&#38;gt;getAll('select * from test1 limit 5'));
print_r($db-&#38;gt;getFields('test'));
print_r($db-&#38;gt;insert('test',array('title'=&#38;gt;'insert test','test'=&#38;gt;'123123')));
print_r($db-&#38;gt;update('test',array('title'=&#38;gt;'insert test111','test'=&#38;gt;'123123'),array('id'=&#38;gt;'2')));
print_r($db-&#38;gt;delete('test',array('title'=&#38;gt;'insert test')));
$db-&#38;gt;close();?&#62;

下载
]]></description>
			<content:encoded><![CDATA[<p>写自己框架时封装的一个PDO类，例子看test.php，MYSQLi的等等再说，别说PDO是已经封装好了的话，多种环境统一的代码风格很重要</p>
<div class="blockcode">
<h5>代码:</h5>
<pre class="brush: php;">
&lt;?php
update($table,$args,$condition);
print_r($db-&amp;gt;fetAll('test',$condition = '',$sort = '',$limit = '5',$field = '*'));
print_r($db-&amp;gt;fetOne('test',$condition = null,$field = '*'));
print_r($db-&amp;gt;execute('update test set title=&quot;24234&quot; where id=1'));
print_r($db-&amp;gt;getRow('select count(*) from test'));*/
print_r($db-&amp;gt;getOne('select * from test'));
print_r($db-&amp;gt;getAll('select * from test1 limit 5'));
print_r($db-&amp;gt;getFields('test'));
print_r($db-&amp;gt;insert('test',array('title'=&amp;gt;'insert test','test'=&amp;gt;'123123')));
print_r($db-&amp;gt;update('test',array('title'=&amp;gt;'insert test111','test'=&amp;gt;'123123'),array('id'=&amp;gt;'2')));
print_r($db-&amp;gt;delete('test',array('title'=&amp;gt;'insert test')));
$db-&amp;gt;close();?&gt;
</pre>
<p><a href="/uploads/2009/01/pdo.rar">下载</a></div>
]]></content:encoded>
			<wfw:commentRss>http://zxsv.com/post/271.html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>一些开发中数据库的技巧</title>
		<link>http://zxsv.com/post/267.html</link>
		<comments>http://zxsv.com/post/267.html#comments</comments>
		<pubDate>Mon, 30 Mar 2009 13:52:09 +0000</pubDate>
		<dc:creator>剑气凌人</dc:creator>
				<category><![CDATA[系统]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[北京]]></category>
		<category><![CDATA[斑点狗]]></category>
		<category><![CDATA[桌上足球]]></category>

		<guid isPermaLink="false">http://zxsv.com/?p=267</guid>
		<description><![CDATA[1、一般写多个表的时候，会把附表的内容生成数组缓存到主表上面去，这样查询的时候只查询一个表，附表中的内容用数组分解(只是小型的，大型的用lucene或solr，或底层用C来写)
2、搜索时，把搜索结果缓存到一个单独的表中，存结果ID,第二次搜索先求缓存表中的关键字
3、MYSQL &#60; MYSQLi &#60; PDO
4、文件缓存 &#60; 内存缓存
5、数据的优化 &#60; 业务层的优化
]]></description>
			<content:encoded><![CDATA[<p>1、一般写多个表的时候，会把附表的内容生成数组缓存到主表上面去，这样查询的时候只查询一个表，附表中的内容用数组分解(只是小型的，大型的用lucene或solr，或底层用C来写)<br />
2、搜索时，把搜索结果缓存到一个单独的表中，存结果ID,第二次搜索先求缓存表中的关键字<br />
3、MYSQL &lt; MYSQLi &lt; PDO<br />
4、文件缓存 &lt; 内存缓存<br />
5、数据的优化 &lt; 业务层的优化</p>
]]></content:encoded>
			<wfw:commentRss>http://zxsv.com/post/267.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PHP中高级OOP的DEMO</title>
		<link>http://zxsv.com/post/269.html</link>
		<comments>http://zxsv.com/post/269.html#comments</comments>
		<pubDate>Sat, 28 Mar 2009 06:23:00 +0000</pubDate>
		<dc:creator>剑气凌人</dc:creator>
				<category><![CDATA[代码]]></category>

		<guid isPermaLink="false">http://zxsv.com/?p=269</guid>
		<description><![CDATA[PHP5.3
命名空间

&#60;?php
//哎，为何非要用\了
namespace my\name; // see &#34;Defining Namespaces&#34; section
class MyClass {}
function myfunction() {}
const MYCONST = 1;

$a = new MyClass;
$c = new \my\name\MyClass; // see &#34;Global Space&#34; section
$a = strlen('hi'); // see &#34;Using namespaces: fallback to global
// function/constant&#34; section
$d = namespace\MYCONST; // see &#34;namespace operator and __NAMESPACE__
// constant&#34; section$d = __NAMESPACE__ . '\MYCONST';
echo constant($d); // see &#34;Namespaces and [...]]]></description>
			<content:encoded><![CDATA[<p>PHP5.3<br />
命名空间</p>
<pre class="brush: php;">
&lt;?php
//哎，为何非要用\了
namespace my\name; // see &quot;Defining Namespaces&quot; section
class MyClass {}
function myfunction() {}
const MYCONST = 1;

$a = new MyClass;
$c = new \my\name\MyClass; // see &quot;Global Space&quot; section
$a = strlen('hi'); // see &quot;Using namespaces: fallback to global
// function/constant&quot; section
$d = namespace\MYCONST; // see &quot;namespace operator and __NAMESPACE__
// constant&quot; section$d = __NAMESPACE__ . '\MYCONST';
echo constant($d); // see &quot;Namespaces and dynamic language features&quot; section
?&gt;
</pre>
<p><span id="more-269"></span><br />
方法重载</p>
<pre class="brush: php;">
&lt;?php
class Overloader{
private $properties=array();

function __get($property_name){
if(isset($this-&gt;properties[$property_name])){
return ($this-&gt;properties[$property_name]);
}else{
return (null);
}
}

function __set($property_name,$value){
$this-&gt;properties[$property_name]=$value;
}

function __call($function_name,$args){
switch($function_name){
case &quot;Say&quot;:
switch(count($args)){
case 1:
return $this-&gt;Say1($args[0]);
case 2:
return $this-&gt;Say2($args[0],$args[1]);
case 3:
return $this-&gt;Say3($args[0],$args[1],$args[2]);
default :break;
}
default :break;
}
}

function Say1($one){
return &quot;$one &lt;br /&gt;&quot;;
}

function Say2($one,$two){
return &quot;$one--$two &lt;br /&gt;&quot;;
}

function Say3($one,$two,$three){
return &quot;$one--$two--$three &lt;br /&gt;&quot;;
}
}
$o=new Overloader();
//invoke __set()给一个不存在的属性变量赋值，激活__set()
$o-&gt;dynaProp=&quot;Dynamic Content&quot;; //自动调用__set()方法
//invoke __get()激活__get()
print($o-&gt;dynaProp.&quot;&lt;br /&gt;&quot;);//自动调用__get()方法
//invoke __call()激活__call()
@$o-&gt;dynaMethod(&quot;Leon&quot;,&quot;Zeev&quot;);//自动调用__call()方法
//方法的重载
$test1=$o-&gt;Say(&quot;test1&quot;);
$test2=$o-&gt;Say(&quot;test1&quot;,&quot;test2&quot;);
$test3=$o-&gt;Say(&quot;test1&quot;,&quot;test2&quot;,&quot;test3&quot;);
echo $test1,'&lt;br /&gt;',$test2,'&lt;br /&gt;',$test3;
?&gt;
</pre>
<p>多重继承</p>
<pre class="brush: php;">
&lt;?
interface IFOne {
function getName();
}
interface IFTwo {
function getID();
}
//Php 抽象类
abstract class AbsClsOne {
var $name;
function setName($name) {
$this-&gt;name = $name;
}
}
abstract class AbsClsTwo {
var $id;
function setID($id) {
$this-&gt;id = $id;
}
}
//单继承 多实现
class ExtendsMoreCls extends AbsClsOne implements IFOne, IFTwo {
var $id;
private static $priVar = &quot;private&quot;;
function __construct() { //Php5的 构造函数
self::$priVar = &quot;set private&quot;;
$this-&gt;id = 0;
}
function __destruct() { //释构函数
echo &quot;ExtendsMoreCls destruct&quot;;
}
function getName() {
return $this-&gt;name;
}
function getID() {
return $this-&gt;id;
}
public static function clsStaticFunc() {
echo &quot;static function&quot;;
}
}

$emc = new ExtendsMoreCls ( );
$emc-&gt;setName ( &quot;kj021320&quot; );
echo $emc-&gt;getName ();
echo &quot;&lt;br&gt;&quot;;
echo $emc-&gt;getID ();
echo &quot;&lt;br&gt;&quot;;
ExtendsMoreCls::clsStaticFunc (); //调用静态方法
echo &quot;&lt;br&gt;&quot;;
?&gt;
</pre>
]]></content:encoded>
			<wfw:commentRss>http://zxsv.com/post/269.html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>PHP跨域上传的几种方法</title>
		<link>http://zxsv.com/post/268.html</link>
		<comments>http://zxsv.com/post/268.html#comments</comments>
		<pubDate>Wed, 25 Feb 2009 01:53:13 +0000</pubDate>
		<dc:creator>剑气凌人</dc:creator>
				<category><![CDATA[代码]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[上传]]></category>
		<category><![CDATA[跨域]]></category>

		<guid isPermaLink="false">http://zxsv.com/?p=268</guid>
		<description><![CDATA[方法一：域名：http://attachments.zxsv.com/
文件夹：/home/web/attachments
虚拟二级目录到/home/web/zxsv/下（支持同局域网的服务器）
即域名为http://zxsv.com/attachments/，这样多个子域名进行上传的设计时，只需要attachments目录映射为相关的域名的二级目录，这样就可实现多个子域名共享一个附件服务器了，这种方法最好是用局域网中的附件服务器，这样流量是分开的，当然访问附件的域名是http://attachments.zxsv.com/，apache,ngixn,IIS等的虚拟二级目录就不说了，好处是现有程序不做任何修改，唯一坏处就是两台服务器必须在一个局域网中，当然你用单台也就没这个问题了
方法二：FTP同步更新
PHP是支持FTP的，给个FTP类里面（不是我写的，只是加了个建立多级目录），自己看着办吧，上传后调用FTP类，同步到FTP服务器中，好处是现有程序只需要在上传那段加上FTP上传就行了，坏处就是一定要支持FTP
&#60;?php
$ftp=new Ftp;
//print_r($ftp-&#62;nlist(&#8221;"));
$ftp-&#62;makedir(&#8221;3&#8243;);
//$ftp-&#62;put(&#8221;comment.php&#8221;,&#8221;1.txt&#8221;);
$ftp-&#62;bye();
//R FTP 处理;
class ftp {
var $ftpUrl = &#8216;www.zxsv.com&#8217;;
var $ftpUser = &#8216;zxsv&#8217;;
var $ftpPass = &#8216;111111&#8242;;
var $ftpDir = &#8216;/zxsv/&#8217;;
var $ftpR = &#8221;; //R ftp资源;
var $status = &#8221;;
//R 1:成功;2:无法连接ftp;3:用户错误;
function ftp() {
if ($this-&#62;ftpR = ftp_connect($this-&#62;ftpUrl, 21)) {
if (ftp_login($this-&#62;ftpR, $this-&#62;ftpUser, $this-&#62;ftpPass)) {
if (!empty($this-&#62;ftpDir)) {
ftp_chdir($this-&#62;ftpR, $this-&#62;ftpDir);
}
ftp_pasv($this-&#62;ftpR, true);//R 启用被动模式;
$status = 1;
} else {
$status = 3;
}
} else {
$status = 2;
}
}
//R 切换目录;
function cd($dir) [...]]]></description>
			<content:encoded><![CDATA[<p>方法一：域名：http://attachments.zxsv.com/<br />
文件夹：/home/web/attachments<br />
虚拟二级目录到/home/web/zxsv/下（支持同局域网的服务器）<br />
即域名为http://zxsv.com/attachments/，这样多个子域名进行上传的设计时，只需要attachments目录映射为相关的域名的二级目录，这样就可实现多个子域名共享一个附件服务器了，这种方法最好是用局域网中的附件服务器，这样流量是分开的，当然访问附件的域名是http://attachments.zxsv.com/，apache,ngixn,IIS等的虚拟二级目录就不说了，好处是现有程序不做任何修改，唯一坏处就是两台服务器必须在一个局域网中，当然你用单台也就没这个问题了<span id="more-268"></span><br />
方法二：FTP同步更新</p>
<p>PHP是支持FTP的，给个FTP类里面（不是我写的，只是加了个建立多级目录），自己看着办吧，上传后调用FTP类，同步到FTP服务器中，好处是现有程序只需要在上传那段加上FTP上传就行了，坏处就是一定要支持FTP</p>
<p>&lt;?php<br />
$ftp=new Ftp;<br />
//print_r($ftp-&gt;nlist(&#8221;"));<br />
$ftp-&gt;makedir(&#8221;3&#8243;);<br />
//$ftp-&gt;put(&#8221;comment.php&#8221;,&#8221;1.txt&#8221;);<br />
$ftp-&gt;bye();</p>
<p>//R FTP 处理;<br />
class ftp {<br />
var $ftpUrl = &#8216;www.zxsv.com&#8217;;<br />
var $ftpUser = &#8216;zxsv&#8217;;<br />
var $ftpPass = &#8216;111111&#8242;;<br />
var $ftpDir = &#8216;/zxsv/&#8217;;<br />
var $ftpR = &#8221;; //R ftp资源;<br />
var $status = &#8221;;<br />
//R 1:成功;2:无法连接ftp;3:用户错误;<br />
function ftp() {<br />
if ($this-&gt;ftpR = ftp_connect($this-&gt;ftpUrl, 21)) {<br />
if (ftp_login($this-&gt;ftpR, $this-&gt;ftpUser, $this-&gt;ftpPass)) {<br />
if (!empty($this-&gt;ftpDir)) {<br />
ftp_chdir($this-&gt;ftpR, $this-&gt;ftpDir);<br />
}<br />
ftp_pasv($this-&gt;ftpR, true);//R 启用被动模式;<br />
$status = 1;<br />
} else {<br />
$status = 3;<br />
}<br />
} else {<br />
$status = 2;<br />
}<br />
}<br />
//R 切换目录;<br />
function cd($dir) {<br />
return ftp_chdir($this-&gt;ftpR, $dir);<br />
}<br />
//建立目录<br />
function mkdir($dir){<br />
return ftp_mkdir($this-&gt;ftpR, $dir);<br />
}</p>
<p>function makedir($dir) {<br />
if(!$dir) return 0;<br />
$dir = str_replace( &#8220;\\&#8221;, &#8220;/&#8221;, $dir );<br />
$mdir = &#8220;&#8221;;<br />
foreach(explode( &#8220;/&#8221;, $dir ) as $val ) {<br />
$mdir .= $val.&#8221;/&#8221;;<br />
if( $val == &#8220;..&#8221; || $val == &#8220;.&#8221; ) continue;<br />
if(!@mkdir($mdir)){<br />
echo &#8220;创建目录 [".$mdir."]失败.&#8221;;<br />
//exit;<br />
}<br />
}<br />
return true;<br />
}</p>
<p>//删除目录<br />
function rmdir($dir){<br />
return ftp_rmdir($this-&gt;ftpR, $dir);<br />
}<br />
//R 返回当前路劲;<br />
function pwd() {<br />
return ftp_pwd($this-&gt;ftpR);<br />
}<br />
//R 上传文件;<br />
function put($localFile, $remoteFile = &#8221;) {<br />
if ($remoteFile == &#8221;) {<br />
$remoteFile = end(explode(&#8217;/', $localFile));<br />
}<br />
$res = ftp_nb_put($this-&gt;ftpR, $remoteFile, $localFile, FTP_BINARY);<br />
print_r($res);<br />
while ($res == FTP_MOREDATA) {<br />
$res = ftp_nb_continue($this-&gt;ftpR);<br />
}<br />
if ($res == FTP_FINISHED) {<br />
return true;<br />
} elseif ($res == FTP_FAILED) {<br />
return false;<br />
}<br />
}<br />
//R 下载文件;<br />
function get($remoteFile, $localFile = &#8221;) {<br />
if ($localFile == &#8221;) {<br />
$localFile = end(explode(&#8217;/', $remoteFile));<br />
}<br />
if (ftp_get($this-&gt;ftpR, $localFile, $remoteFile, FTP_BINARY)) {<br />
$flag = true;<br />
} else {<br />
$flag = false;<br />
}<br />
return $flag;<br />
}<br />
//R 文件大小;<br />
function size($file) {<br />
return ftp_size($this-&gt;ftpR, $file);<br />
}<br />
//R 文件是否存在;<br />
function isFile($file) {<br />
if ($this-&gt;size($file) &gt;= 0) {<br />
return true;<br />
} else {<br />
return false;<br />
}<br />
}<br />
//R 文件时间<br />
function fileTime($file) {<br />
return ftp_mdtm($this-&gt;ftpR, $file);<br />
}<br />
//R 删除文件;<br />
function unlink($file) {<br />
return ftp_delete($this-&gt;ftpR, $file);<br />
}<br />
function nlist($dir = &#8216;/service/resource/&#8217;) {<br />
return ftp_nlist($this-&gt;ftpR, $dir);<br />
}<br />
//R 关闭连接;<br />
function bye() {<br />
return ftp_close($this-&gt;ftpR);<br />
}<br />
}<br />
?&gt;</p>
<p>方法三：AJAX、FLASH跨域上传，这方面不熟，就不说了</p>
]]></content:encoded>
			<wfw:commentRss>http://zxsv.com/post/268.html/feed</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>桌上足球之神奇进球篇</title>
		<link>http://zxsv.com/post/263.html</link>
		<comments>http://zxsv.com/post/263.html#comments</comments>
		<pubDate>Sun, 11 Jan 2009 16:15:11 +0000</pubDate>
		<dc:creator>剑气凌人</dc:creator>
				<category><![CDATA[桌上足球]]></category>

		<guid isPermaLink="false">http://zxsv.com/?p=263</guid>
		<description><![CDATA[我们公司的桌上足球,和这样子差不多

不过现在已经快被我们给打的四个脚都断掉了
发两张近期的神奇进球路线,太帅了
头一次,对方守门员一脚大力抽射,球进我方球门,问题就是他的力量太大,反弹出来,随手一脚把球抽过去,直接进他球门,大家都狂笑起来,如下图

另一次更搞,如下图,我一角球(当然,我最喜欢发这种球的,进球率最高)进对方球门,力量太大反射出球门后,啪啪两声,进自家球门了,那叫个哭呀

]]></description>
			<content:encoded><![CDATA[<p>我们公司的桌上足球,和这样子差不多</p>
<p><img class="alignnone size-full wp-image-264" title="2008113213042660" src="/uploads/2009/01/2009013213042660.jpg" alt="2009013213042660" width="402" height="323" /></p>
<p>不过现在已经快被我们给打的四个脚都断掉了</p>
<p>发两张近期的神奇进球路线,太帅了</p>
<p>头一次,对方守门员一脚大力抽射,球进我方球门,问题就是他的力量太大,反弹出来,随手一脚把球抽过去,直接进他球门,大家都狂笑起来,如下图<br />
<a href="/uploads/2009/01/2009113213042661.jpg"><img class="alignnone" title="2009113213042661" src="/uploads/2009/01/2009113213042661.jpg" alt="" width="523" height="377" /></a></p>
<p>另一次更搞,如下图,我一角球(当然,我最喜欢发这种球的,进球率最高)进对方球门,力量太大反射出球门后,啪啪两声,进自家球门了,那叫个哭呀<br />
<a href="/uploads/2009/01/2009113213042662.jpg"><img class="alignnone" title="2009113213042662" src="/uploads/2009/01/2009113213042662.jpg" alt="" width="523" height="377" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://zxsv.com/post/263.html/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>7月后MSN签名</title>
		<link>http://zxsv.com/post/262.html</link>
		<comments>http://zxsv.com/post/262.html#comments</comments>
		<pubDate>Sun, 11 Jan 2009 14:06:40 +0000</pubDate>
		<dc:creator>剑气凌人</dc:creator>
				<category><![CDATA[杂货铺]]></category>
		<category><![CDATA[流水帐]]></category>
		<category><![CDATA[签名]]></category>

		<guid isPermaLink="false">http://zxsv.com/?p=302</guid>
		<description><![CDATA[[2009-01-11 21:51]     剑气凌人 &#124; 我一直就是个老好人而已(被人郁闷)
[2009-01-10 15:23]     剑气凌人 &#124; 两个人之间不是去改变对方，而是去同化！
[2009-01-03 16:01]     剑气凌人 &#124; 有缺陷才完整
[2008-12-31 12:00]     剑气凌人 &#124; I love you,I love my city
[2008-12-26 17:01]     剑气凌人 &#124; 没目标就是最好的目标，随遇而安，人生都是随机数，决不决定只在一秒间
[2008-12-02 12:00]     剑气凌人 &#124; 从前善话未愿接受
[2008-11-13 20:35]     剑气凌人 &#124; 又老了一岁(农历生日)
[2008-11-03 10:15]     剑气凌人 &#124; so Close(这首歌不错)
[2008-11-06 21:16]     剑气凌人 &#124; 如果冲动是魔鬼，那就让我魔鬼一次吧是(这个比较经典,但内容不能说)
[2008-10-28 22:35]     剑气凌人 [...]]]></description>
			<content:encoded><![CDATA[<p>[2009-01-11 21:51]     剑气凌人 | 我一直就是个老好人而已(被人郁闷)<br />
[2009-01-10 15:23]     剑气凌人 | 两个人之间不是去改变对方，而是去同化！<br />
[2009-01-03 16:01]     剑气凌人 | 有缺陷才完整<br />
[2008-12-31 12:00]     剑气凌人 | I love you,I love my city<br />
[2008-12-26 17:01]     剑气凌人 | 没目标就是最好的目标，随遇而安，人生都是随机数，决不决定只在一秒间<br />
[2008-12-02 12:00]     剑气凌人 | 从前善话未愿接受<br />
[2008-11-13 20:35]     剑气凌人 | 又老了一岁(农历生日)<br />
[2008-11-03 10:15]     剑气凌人 | so Close(这首歌不错)<br />
[2008-11-06 21:16]     剑气凌人 | 如果冲动是魔鬼，那就让我魔鬼一次吧是(这个比较经典,但内容不能说)<br />
[2008-10-28 22:35]     剑气凌人 | 好剑不凌人，其气也衰；好语不凌人，其言也诚。(凌志给的评语)<br />
[2008-10-24 09:26]     剑气凌人 | 挨了一刀，又打了个补丁(动了个小手术)<br />
[2008-10-07 18:02]     剑气凌人 | 借醋同借螃蟹，谢谢(有人要请我吃螃蟹,嘻嘻,当然要蹭了)<br />
[2008-10-06 17:33]     剑气凌人 | 问天何寿?问地何极?人生必何?生何允?老何俱?死何苦?情为何物?人世何苦?苍生何辜?&#8211;九问<br />
[2008-09-28 09:14]     剑气凌人 | 回家 (国庆回家中)<br />
[2008-09-15 21:34]     剑气凌人 | 若求人，先求己<br />
[2008-09-12 00:17]     剑气凌人 | 有钱吗？借我五万块(要买房给老妈住)<br />
[2008-09-07 00:02]     剑气凌人 | 给点有技术含量的事我行不行呀(觉得做的事情太简单了)<br />
[2008-09-03 09:26]     剑气凌人 | 白领家也没有余粮啊,努力当好四有新贫农(穷呀)<br />
[2008-08-29 13:32]     剑气凌人 | 弹JJ弹到永垂不朽(哈哈哈,这个经典)<br />
[2008-08-21 20:57]     剑气凌人 | 戒饭中 PS:宁戒饭,不戒烟(老烟民了)<br />
[2008-08-18 10:04]     剑气凌人 | 虽沧海横流，惟恒然不变<br />
[2008-08-07 16:06]     剑气凌人 | 用举世闻名的整容术为贫瘠的历史隆胸(一句对韩国非常经典的评价)<br />
[2008-07-27 00:09]     剑气凌人 | 写代码比调戏花姑娘更有趣<br />
[2008-07-08 01:16]     剑气凌人 | 当华美的叶片落尽，生命的脉络才历历可见<br />
[2008-07-07 12:00]     剑气凌人 | IXNA内测版已经放出，要求测试请MAIL</p>
<p>还是有不少比较精彩的签名的,只不过QQ上的签名都没保留</p>
]]></content:encoded>
			<wfw:commentRss>http://zxsv.com/post/262.html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
