<?xml version="1.0" encoding="utf-8"?><feed xmlns="http://www.w3.org/2005/Atom"><title type="text">博客园_torome</title><subtitle type="text">不要用现实抱怨生活，不要刻意压抑自己和别人，没有人有必要因为你的存在而要刻意改变什么，改变的只能是你自己！</subtitle><id>http://feed.cnblogs.com/blog/u/14739/rss</id><updated>2011-10-15T11:42:36Z</updated><author><name>torome</name><uri>http://www.cnblogs.com/torome/</uri></author><generator>CNBlogs BlogServer</generator><link rel="alternate" type="text/html" href="http://www.cnblogs.com/torome/"/><link rel="self" type="application/atom+xml" href="http://feed.cnblogs.com/blog/u/14739/rss"/><entry><id>http://www.cnblogs.com/torome/archive/2011/03/14/1983980.html</id><title type="text">我希望四年前就有人告诉我的事情</title><summary type="text">就在2007年，我毅然离开了微软，加入了创业者的队伍。像很多第一次创业的人一样，我对这种冒险非常的兴奋。同样也跟很多第一次创业的人一样，我茫然没有头绪。 我参加各种活动，聚会，研讨会，和西雅图本地的创业社区密切交往。当我到了硅谷后，我发现这里有更多的活动，聚会，更多的研讨会。在这个创业生态系统里，一切很忙、很活跃，我收获了大量的人们共享出来的知识和体验，我如饥似渴的享用着。 我还满腔热情的看了很多的博客，视频和书籍。活动、聚会、研讨会中人们分享和讨论的都是非常好的主题。 我甚至还加入了一个创业孵化机构！ 直到决定开办自己的公司时，我才意识到，所有我的阅读、观看、参加的活动实际上没有给我带来任.</summary><published>2011-03-14T09:15:00Z</published><updated>2011-03-14T09:15:00Z</updated><author><name>torome</name><uri>http://www.cnblogs.com/torome/</uri></author><link rel="alternate" href="http://www.cnblogs.com/torome/archive/2011/03/14/1983980.html"/><link rel="alternate" type="text/html" href="http://www.cnblogs.com/torome/archive/2011/03/14/1983980.html"/><content type="html">&lt;div&gt;&lt;p&gt;就在2007年，我毅然离开了微软，加入了创业者的队伍。像很多第一次创业的人一样，我对这种冒险非常的兴奋。同样也跟很多第一次创业的人一样，我茫然没有头绪。&lt;/p&gt; &lt;p&gt;我参加各种活动，聚会，研讨会，和西雅图本地的创业社区密切交往。当我到了硅谷后，我发现这里有更多的活动，聚会，更多的研讨会。在这个创业生态系统里，一切很忙、很活跃，我收获了大量的人们共享出来的知识和体验，我如饥似渴的享用着。&lt;/p&gt; &lt;p&gt;我还满腔热情的看了很多的博客，视频和书籍。活动、聚会、研讨会中人们分享和讨论的都是非常好的主题。&lt;/p&gt; &lt;p&gt;我甚至还加入了一个创业孵化机构！&lt;/p&gt; &lt;p&gt;直到决定开办自己的公司时，我才意识到，所有我的阅读、观看、参加的活动实际上没有给我带来任何的用处。我是认真的。&lt;strong&gt;完全没有任何用处。&lt;/strong&gt;大部分我学到的东西都想不起来了，剩下一点能记住的也很少能应用到我现在的处境里。学习他人的经验和成功对我就像是在吃快餐，像是吃那些味道很好的垃圾食品，让我膨胀，让我自满。抱歉我在泼冷水，但这是事实。&lt;/p&gt; &lt;p&gt;起初，我努力把我学到的东西应用到我自己的问题里。不灵。这不可思议的时刻真的到来了，我平静的接受了这个事实：我浪费了大量的时间去学了一些根本不需要的东西，我相信有人说过的一句话正是在嘲笑我的这些行为：&lt;strong&gt;所有的这些活动，研讨会，博客文章都只是用来多拖延你一天立即行动的另一个借口。&lt;/strong&gt;我默默的接受这个事实，以一个新手的心情往前走，沿着这个方向，我相信我将会理解出什么才是我需要的。&lt;/p&gt; &lt;p&gt;所有的变化由此而来。&lt;/p&gt; &lt;p&gt;我们每个人身上都有一种东西，想在这种存在着不确定性、具有风险的创业冒险活动中创造，成就，前进。但我们还有另外一种东西，每个人都希望能感到确定，可靠，让我们能做出正确的决策，让我们在这条道路上不至于失败、使自己受伤。矛盾冲突就是从此产生的。&lt;/p&gt; &lt;p&gt;可是这些博客，活动，访谈并不能真正的消解这些矛盾。只是暂时的，它让我知道，有很多人在做和我同样的事情，让我放松。去创业是让我走出我的安逸环境，而我所做的只是从一个安逸环境跳到另外一个安逸环境。你知道吗？我就职于一个不错的公司！&lt;/p&gt; &lt;p&gt;一天，我反省一下我目前的状况，发现自己忙于很多事情，唯独没有把时间用于自己的产品上。几个月后，我终于鼓足勇气对自己说：&lt;strong&gt;这唯一重要的事情是真正的坐下来去做事。&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;别误会。我觉得有些博客和研讨会还是有价值的。但除非你真正的去实施什么事情、给你所学所扩展的关系网创造一个用武之地，你就是在浪费你的宝贵时间。&lt;/p&gt; &lt;p&gt;&lt;strong&gt;下面就是一些帮助了我去克服这&amp;#8220;创业困惑综合征&amp;#8221;的东西：&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;&amp;#8212;&amp;#8212;我数周内不再阅读创业新闻和博客，我意识到对于我的产品我不缺任何东西。至于谁又获得了融资，谁被收购了，以及为什么在Google  Chrome的竞争下IE丧失了它的市场份额，这跟我没有任何关系。我唯一要关心的人是客户，我唯一要关心的事情是他们的需求和愿望、如何提供他们最有价 值的东西。&lt;/p&gt; &lt;p&gt;&amp;#8212;&amp;#8212;我数月不去参加那些创业相关的活动，而且开始通过咖啡和酒去交接朋友。每月我仍可能会去参加一两个活动，但那只是为了娱乐。我不再迷惑于为了成为一个企业家而且参加那些创业相关的活动。&lt;/p&gt; &lt;p&gt;&amp;#8212;&amp;#8212;我通过小项目来实践学习。我把一些想法细化成容易管理的细目，给自己设定期限去完成它们。项目和试验品是神奇的教学工具，因为你在学习你想要的，你在获得第一手资料。就像&lt;a href="http://www.keynotopia.com/" target="_blank"&gt;Keynotopia&lt;/a&gt;这个项目极大的帮助了我产生灵感，形成思路，我可以看见它，和它交互，展示给别人&amp;#8212;&amp;#8212;这就是我首先要把它做出来的原因！有时一些小项目还可以让你获得不少&lt;a href="http://blog.amirkhella.com/2010/09/21/the-story-of-keynotopia-how-i-launched-a-profitable-product-in-3-hours/" target="_blank"&gt;收入&lt;/a&gt;。&lt;/p&gt; &lt;p&gt;&amp;#8212;&amp;#8212;每走一步，我都准备好一个问题清单，它能让我知道下一步该往哪里走。是该去获得更多的访问量？改进产品？还是在不提高访问量的情况下提高收 入？我整理出最好的问题，然后研究它，咨询人们，然后把获得的答案立即付诸于行动。这些信息我都不会让它们在我的大脑里转的太久。&lt;/p&gt; &lt;p&gt;&amp;#8212;&amp;#8212;&lt;strong&gt;这是我的最爱&lt;/strong&gt;：我更多的恐惧是产生于没有去行动，而不是相反的害怕去行动。我认识到，晚一天我没有让客 户接受我的方案，竞争对手就多一天的机会比我先达到客户要求。我甚至设想到了如果我不能行动起来，最终将会看到最可怕的噩梦：从办公室又回到密尔顿，在 Innotech的小隔间里饱食终日，拿着那个红色的订书机，等着下一次的发薪日。这正是我需要的充满魔力的紧迫感。&lt;/p&gt; &lt;p&gt;&amp;#8212;&amp;#8212;我第一是要把事情完成，然后才是把事情办对。我知道(深受教训)，做事的劲头重要无比。如果你在得到一个想法后不能立即付诸实施，最终很有 可能的结局是这个想法被束之高阁。如今不论何时我得到了一个想法，我会盯着它让它成为现实，让它变成实际。我立即行动，虽然方式不成熟，但之后想办法改 进，这样就学会了自己真正需要的东西。&lt;/p&gt; &lt;p&gt;&amp;#8212;&amp;#8212;面对现实：如果你不走出你的安逸环境、动手去干，什么事情都不会发生。等待再等待，罕有行动。&lt;/p&gt; &lt;p&gt;我想留给你们一句改变了我的生活的名言：&lt;strong&gt;成功的人并不是一定比别人更有才智和更幸运。他们只是在不断的尝试、不断的失败，直到成功。&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;不要做想象中的企业家。用行动和成果成为企业家。&lt;/p&gt;&lt;/div&gt;&lt;img src="http://www.cnblogs.com/torome/aggbug/1983980.html?type=1" width="1" height="1" alt=""/&gt;&lt;p&gt;&lt;a href="http://www.cnblogs.com/torome/archive/2011/03/14/1983980.html" target="_blank"&gt;本文链接&lt;/a&gt;&lt;/p&gt;</content></entry><entry><id>http://www.cnblogs.com/torome/archive/2011/03/13/1982927.html</id><title type="text">用php_screw加密PHP代码</title><summary type="text">开始之前，首先要澄清两个问题：第一，支持开源，不等于反对代码加密；第二，如果把不属于自己的东西（比如公司的）拿去开源，就更加不应该了。以前知道的，PHP代码的加密都是用Zend的encoder，这东西不但是商业软件，好像还暴出过能够被破解的问题，所以就找到了替代的方案────php_screw，一个日本人开发的东东。php_screw非常小巧，没有仔细看过它的算法，但从说明文档中看，可以自行更改SEED，然后自行编译so和可执行档。如果够牛的话，甚至可以自己去更改算法。不管怎样，对于我们这些“普通人”来说，这种加密应该就够了吧，如果真想滴水不漏，那还是不要公开的好，虽然作者说的并不是很容易就破</summary><published>2011-03-13T12:16:00Z</published><updated>2011-03-13T12:16:00Z</updated><author><name>torome</name><uri>http://www.cnblogs.com/torome/</uri></author><link rel="alternate" href="http://www.cnblogs.com/torome/archive/2011/03/13/1982927.html"/><link rel="alternate" type="text/html" href="http://www.cnblogs.com/torome/archive/2011/03/13/1982927.html"/><content type="html">&lt;div&gt;&lt;span style="color: #555555; font-family: Verdana, 'BitStream vera Sans', Tahoma, Helvetica, sans-serif; font-size: 12px; line-height: 17px; "&gt;&lt;p style="margin-top: 0px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "&gt;开始之前，首先要澄清两个问题：第一，支持开源，不等于反对代码加密；第二，如果把不属于自己的东西（比如公司的）拿去开源，就更加不应该了。&lt;/p&gt;&lt;p style="margin-top: 0px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "&gt;以前知道的，PHP代码的加密都是用Zend的encoder，这东西不但是商业软件，好像还暴出过能够被破解的问题，所以就找到了替代的方案&amp;#9472;&amp;#9472;&amp;#9472;&amp;#9472;&lt;a href="http://sourceforge.net/projects/php-screw/" style="color: #2970a6; text-decoration: none; "&gt;php_screw&lt;/a&gt;，一个&lt;a href="http://www.pm9.com/newpm9/itbiz/php/phpscrew/" style="color: #2970a6; text-decoration: none; "&gt;日本人&lt;/a&gt;开发的东东。&lt;/p&gt;&lt;p style="margin-top: 0px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "&gt;php_screw非常小巧，没有仔细看过它的算法，但从说明文档中看，可以自行更改SEED，然后自行编译so和可执行档。如果够牛的话，甚至可以自己去更改算法。不管怎样，对于我们这些&amp;#8220;普通人&amp;#8221;来说，这种加密应该就够了吧，如果真想滴水不漏，那还是不要公开的好，虽然作者说的并不是很容易就破解，但指不定哪儿有牛群呢不是么？&lt;/p&gt;&lt;p style="margin-top: 0px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "&gt;安装的环境需要：PHP5.x，zlib开启，autoconf，automake已安装。&lt;/p&gt;&lt;p style="margin-top: 0px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "&gt;测试环境：Ubuntu 8.04 hardy, PHP 5.2.3。&lt;/p&gt;&lt;p style="margin-top: 0px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "&gt;1、 解压，更改&lt;code&gt;my_screw.h&lt;/code&gt;，里面的几个数字就是SEED，相当于密码，可以随意更改、增加，并且数字的多少不影响解密的速度。&lt;/p&gt;&lt;p style="margin-top: 0px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "&gt;2、编译so文件：&lt;/p&gt;&lt;pre style="margin-top: 5px; margin-right: 0px; margin-bottom: 5px; margin-left: 0px; padding-top: 8px; padding-right: 12px; padding-bottom: 8px; padding-left: 36px; background-image: url(http://www.fwolf.com/blog/wp-content/themes/inove/img/blockquote.gif); background-attachment: initial; background-origin: initial; background-clip: initial; background-color: #f4f5f7; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px; border-top-style: dashed; border-right-style: dashed; border-bottom-style: dashed; border-left-style: dashed; border-top-color: #cccccc; border-right-color: #cccccc; border-bottom-color: #cccccc; border-left-color: #cccccc; background-position: 3px 3px; background-repeat: no-repeat no-repeat; "&gt;&lt;code&gt;$ phpize $ ./configure $ make &lt;/code&gt;&lt;/pre&gt;&lt;p style="margin-top: 0px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "&gt;如果出现这样的错误，那是因为autoconf没有安装：&lt;/p&gt;&lt;pre style="margin-top: 5px; margin-right: 0px; margin-bottom: 5px; margin-left: 0px; padding-top: 8px; padding-right: 12px; padding-bottom: 8px; padding-left: 36px; background-image: url(http://www.fwolf.com/blog/wp-content/themes/inove/img/blockquote.gif); background-attachment: initial; background-origin: initial; background-clip: initial; background-color: #f4f5f7; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px; border-top-style: dashed; border-right-style: dashed; border-bottom-style: dashed; border-left-style: dashed; border-top-color: #cccccc; border-right-color: #cccccc; border-bottom-color: #cccccc; border-left-color: #cccccc; background-position: 3px 3px; background-repeat: no-repeat no-repeat; "&gt;&lt;code&gt;$ make make: *** No targets specified and no makefile found.  Stop. &lt;/code&gt;&lt;/pre&gt;&lt;p style="margin-top: 0px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "&gt;3、安装so文件，编译好的文件在&lt;code&gt;modules&lt;/code&gt;目录下，将其拷贝到php extension存放的位置，比如&lt;code&gt;/usr/lib/php5/20060613+lfs&lt;/code&gt;下，然后在php.ini中增加：&lt;/p&gt;&lt;pre style="margin-top: 5px; margin-right: 0px; margin-bottom: 5px; margin-left: 0px; padding-top: 8px; padding-right: 12px; padding-bottom: 8px; padding-left: 36px; background-image: url(http://www.fwolf.com/blog/wp-content/themes/inove/img/blockquote.gif); background-attachment: initial; background-origin: initial; background-clip: initial; background-color: #f4f5f7; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px; border-top-style: dashed; border-right-style: dashed; border-bottom-style: dashed; border-left-style: dashed; border-top-color: #cccccc; border-right-color: #cccccc; border-bottom-color: #cccccc; border-left-color: #cccccc; background-position: 3px 3px; background-repeat: no-repeat no-repeat; "&gt;&lt;code&gt;extension = php_screw.so &lt;/code&gt;&lt;/pre&gt;&lt;p style="margin-top: 0px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "&gt;4、编译用来加密文件的可执行文件：&lt;/p&gt;&lt;pre style="margin-top: 5px; margin-right: 0px; margin-bottom: 5px; margin-left: 0px; padding-top: 8px; padding-right: 12px; padding-bottom: 8px; padding-left: 36px; background-image: url(http://www.fwolf.com/blog/wp-content/themes/inove/img/blockquote.gif); background-attachment: initial; background-origin: initial; background-clip: initial; background-color: #f4f5f7; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px; border-top-style: dashed; border-right-style: dashed; border-bottom-style: dashed; border-left-style: dashed; border-top-color: #cccccc; border-right-color: #cccccc; border-bottom-color: #cccccc; border-left-color: #cccccc; background-position: 3px 3px; background-repeat: no-repeat no-repeat; "&gt;&lt;code&gt;$ cd tools $ make &lt;/code&gt;&lt;/pre&gt;&lt;p style="margin-top: 0px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "&gt;tools目录下新生成的&lt;code&gt;screw&lt;/code&gt;就是了，放到$PATH中就可以调用了，比如要加密一个文件：&lt;/p&gt;&lt;pre style="margin-top: 5px; margin-right: 0px; margin-bottom: 5px; margin-left: 0px; padding-top: 8px; padding-right: 12px; padding-bottom: 8px; padding-left: 36px; background-image: url(http://www.fwolf.com/blog/wp-content/themes/inove/img/blockquote.gif); background-attachment: initial; background-origin: initial; background-clip: initial; background-color: #f4f5f7; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px; border-top-style: dashed; border-right-style: dashed; border-bottom-style: dashed; border-left-style: dashed; border-top-color: #cccccc; border-right-color: #cccccc; border-bottom-color: #cccccc; border-left-color: #cccccc; background-position: 3px 3px; background-repeat: no-repeat no-repeat; "&gt;&lt;code&gt;$ screw a.php Success Crypting(a.php) &lt;/code&gt;&lt;/pre&gt;&lt;p style="margin-top: 0px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "&gt;加密后的a.php执行正常，同时screw还会把原来没有加密的文件改名为&lt;code&gt;.screw&lt;/code&gt;文件作为备份。&lt;/p&gt;&lt;p&gt;&lt;strong&gt;Update @ 2008-09-01&lt;/strong&gt;&lt;/p&gt;&lt;p style="margin-top: 0px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "&gt;加密之后，还有个小问题，用require或include引用放在include_path下的加密代码时，会当做明文引过来，解决方法有两种：&lt;/p&gt;&lt;ol style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 10px; padding-left: 0px; "&gt;&lt;li style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 20px; list-style-position: inside; "&gt;使用绝对路径引用放在include_path下的加密内容，如果是自己的主机，肯定没问题的；&lt;/li&gt;&lt;li style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 20px; list-style-position: inside; "&gt;使用相对路径来引用，比如在本项目的子目录内，这样也是没问题的。&lt;/li&gt;&lt;/ol&gt;&lt;/span&gt;&lt;/div&gt;&lt;img src="http://www.cnblogs.com/torome/aggbug/1982927.html?type=1" width="1" height="1" alt=""/&gt;&lt;p&gt;&lt;a href="http://www.cnblogs.com/torome/archive/2011/03/13/1982927.html" target="_blank"&gt;本文链接&lt;/a&gt;&lt;/p&gt;</content></entry><entry><id>http://www.cnblogs.com/torome/archive/2011/03/10/1980043.html</id><title type="text">gSoap下Server端接口函数的数据传出</title><summary type="text">gSoap下Server端接口函数的数据传出一、引言 gSOAP是一个OpenSource的web服务开发工具，包括server/client通信和wsdl自动生成功能,能依据wsdl文件生成server和client代码，产生的代码小巧简洁不依赖其他xml解析库，很容易移植，大大减轻webservice程序员的工作量。它提供一种独特的SOAP/XML到C/C++ 语言绑定，以简化C或C++中SOAP/XML Web服务和客户机的开发。gSOAP工具包括一个WSDL生成器，用于为您的 Web 服务生成 Web 服务描述。WSDL importer 工具使SOAP客户机应用程序开发完全自动化。 </summary><published>2011-03-10T09:39:00Z</published><updated>2011-03-10T09:39:00Z</updated><author><name>torome</name><uri>http://www.cnblogs.com/torome/</uri></author><link rel="alternate" href="http://www.cnblogs.com/torome/archive/2011/03/10/1980043.html"/><link rel="alternate" type="text/html" href="http://www.cnblogs.com/torome/archive/2011/03/10/1980043.html"/><content type="html">&lt;div&gt;&lt;span style="color: #333335; font-family: Verdana, Arial, Helvetica, 宋体, sans-serif; line-height: 25px; "&gt;&lt;p style="line-height: 25px; margin-top: 10px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; "&gt;gSoap下Server端接口函数的数据传出&lt;/p&gt;&lt;p style="line-height: 25px; margin-top: 10px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; "&gt;一、引言&lt;br style="line-height: 25px; " /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; gSOAP是一个OpenSource的web服务开发工具，包括server/client通信和wsdl自动生成功能,能依据wsdl文件生成server和client代码，产生的代码小巧简洁不依赖其他xml解析库，很容易移植，大大减轻webservice程序员的工作量。它提供一种独特的SOAP/XML到C/C++ 语言绑定，以简化C或C++中SOAP/XML Web服务和客户机的开发。gSOAP工具包括一个WSDL生成器，用于为您的 Web 服务生成 Web 服务描述。WSDL importer 工具使SOAP客户机应用程序开发完全自动化。&lt;br style="line-height: 25px; " /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; gSoap大大简化了使用C/C++开发WEB Service流程，是C/C++开发人员开发WEB服务一种较佳选择。gSoap的安装以及开发文档请参见参考文献[1]、[2]和[3]，下面我们主要关注gSoap下Server端接口函数的数据传出。&lt;/p&gt;&lt;p style="line-height: 25px; margin-top: 10px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; "&gt;二、单个传出参数&lt;br style="line-height: 25px; " /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; gSoap接口函数的返回值只能是int，是soap调用的结果，一般通过soap.error来判断soap的连接情况。接口函数的最后一个参数为传出参数，必须为引用或指针类型(注:传入参数为能为引用类型)。如下所示：&lt;br style="line-height: 25px; " /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;br style="line-height: 25px; " /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; int ns__add(struct soap *add_soap, int num1, int num2, int *sum)；&lt;/p&gt;&lt;p style="line-height: 25px; margin-top: 10px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; "&gt;三、多个传出参数&lt;br style="line-height: 25px; " /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 如果需要传出多个参数，需要自己定义一个结构将返回项封装，然后以此结构体作为单个参数传出即可。如下所示：&lt;/p&gt;&lt;p style="line-height: 25px; margin-top: 10px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; "&gt;struct type_return{&lt;br style="line-height: 25px; " /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; int id;&lt;br style="line-height: 25px; " /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; char *name;&lt;br style="line-height: 25px; " /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; int age;&lt;br style="line-height: 25px; " /&gt;&amp;nbsp;&amp;nbsp; }&lt;/p&gt;&lt;p style="line-height: 25px; margin-top: 10px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; "&gt;int ns__getInfo(struct soap *soap, int id, struct type_result *ret);&lt;br style="line-height: 25px; " /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;br style="line-height: 25px; " /&gt;四、二进制数据传出&lt;br style="line-height: 25px; " /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 无论是axis c++还是gsoap，对复杂数据类型的支持都不是太好，再加上gsoap的.h文件中不能包含(#include)别的.h文件，可能不能生效，所以需要使用void数据类型，不指明数据类型，返回后再作处理。然而，gsoap不能对void数据类型进行串化(serialize)操作，除非使用union或struct分配实时类型信息。因此，当传出二进行数据时，需要使用xsd__base64Binary结构类型来操作。如下所示：&lt;br style="line-height: 25px; " /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;br style="line-height: 25px; " /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; struct xsd__base64Binary{&lt;br style="line-height: 25px; " /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; unsigned char *__ptr;&lt;br style="line-height: 25px; " /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; int __size;&lt;br style="line-height: 25px; " /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; };&lt;br style="line-height: 25px; " /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;br style="line-height: 25px; " /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 在使用上述结构时，可能需要使用soap_malloc()来进行内存分配，并分配__size值。&lt;/p&gt;&lt;p style="line-height: 25px; margin-top: 10px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; "&gt;int ns__demoFunction(struct soap *soap,..., struct xsd__base64Binary *ret)&lt;br style="line-height: 25px; " /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br style="line-height: 25px; " /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ...&lt;br style="line-height: 25px; " /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ret-&amp;gt;__ptr = (unsigned char *)soap(soap, size); /*size为内存大小*/&lt;br style="line-height: 25px; " /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ret-&amp;gt;__size = size;&lt;br style="line-height: 25px; " /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; memset(ret-&amp;gt;__ptr, 0, size);&lt;br style="line-height: 25px; " /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; memcpy(ret-&amp;gt;__ptr, src_ptr, size); /*src_ptr为源数据块指针*/&lt;br style="line-height: 25px; " /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ...&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;br style="line-height: 25px; " /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return SOAP_OK;&lt;br style="line-height: 25px; " /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/p&gt;&lt;p style="line-height: 25px; margin-top: 10px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; "&gt;五、文件数据传出&lt;br style="line-height: 25px; " /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Soap协议支持附件(Attachment)，gSoap支持MIME/DIME附件，我们可以使用这个特性来进行整个文件或大量的数据传出。gSoap附件操作与(四)中的二进制数据传出非常相近，同样使用struct xsd__base64Binary类型。这时不再重复，详细可参考文献[2]中的#13 MIME Attachments。&lt;/p&gt;&lt;p style="line-height: 25px; margin-top: 10px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; "&gt;六、参考文献&lt;br style="line-height: 25px; " /&gt;1.官方网站 http://gsoap2.sourceforge.net&lt;br style="line-height: 25px; " /&gt;2.gSoap User Guide http://genivia.com/Products/gsoap/documentation.html&lt;br style="line-height: 25px; " /&gt;3.构建WEB服务C/C++客户机 http://www-128.ibm.com/developerworks/cn/websphere/library/techarticles/0301_lin/lin.html&lt;br style="line-height: 25px; " /&gt;4.用C实现WebService http://fanqiang.chinaunix.net/program/c++/2005-10-20/3730.shtml&lt;/p&gt;&lt;/span&gt;&lt;/div&gt;&lt;img src="http://www.cnblogs.com/torome/aggbug/1980043.html?type=1" width="1" height="1" alt=""/&gt;&lt;p&gt;&lt;a href="http://www.cnblogs.com/torome/archive/2011/03/10/1980043.html" target="_blank"&gt;本文链接&lt;/a&gt;&lt;/p&gt;</content></entry><entry><id>http://www.cnblogs.com/torome/archive/2011/03/10/1979960.html</id><title type="text">gsoap简单实例</title><summary type="text">前一阶段写gSOAP 的文章没保存好，后来想写的，越学越没有写的勇气了，感觉自己很菜，但是现在感觉还是写点就算给入门者一点提示吧。另外虽说这篇文章是自己写的，但是却感觉是东拼西凑的，有很多别人的东西了。看了我转载的关于soap 的文章，大家想必对soap有所了解了吧，那么gSOAP是什么那？gSOAP 是一个开源的项目，用它可以方便的使用c/c++地进行SOAP客户端和服务器端编程，而不必了解xml和SOAP协议的细节。这样使用者就可以专注于自 己的web service 客户端或服务器端的编写，而不用纠缠与其它细节。我第一次接触这些东西，我对SOAP的理解是这样的：以http协议为基本的通信</summary><published>2011-03-10T08:37:00Z</published><updated>2011-03-10T08:37:00Z</updated><author><name>torome</name><uri>http://www.cnblogs.com/torome/</uri></author><link rel="alternate" href="http://www.cnblogs.com/torome/archive/2011/03/10/1979960.html"/><link rel="alternate" type="text/html" href="http://www.cnblogs.com/torome/archive/2011/03/10/1979960.html"/><content type="html">&lt;div&gt;&lt;span style="color: #aeaeae; font-family: Arial; font-size: 12px; line-height: 18px; "&gt;&lt;table style="table-layout: fixed; width: 945px; "&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td style="font-family: Arial; word-wrap: break-word; word-break: break-all; visibility: visible !important; zoom: 1 !important; filter: none; font-size: 12px; line-height: 18px; "&gt;&lt;div id="blog_text" style="font-family: Arial; word-wrap: break-word; word-break: normal; visibility: visible !important; zoom: 1 !important; filter: none; font-size: 12px; line-height: 18px; overflow-x: hidden; overflow-y: hidden; position: static; "&gt;&lt;div style="font-family: Arial; word-wrap: break-word; word-break: break-all; visibility: visible !important; zoom: 1 !important; filter: none; font-size: 12px; line-height: normal; "&gt;前一阶段写gSOAP 的文章没保存好，后来想写的，越学越没有写的勇气了，感觉自己很菜，但是现在感觉还是写点就算给入门者一点提示吧。另外虽说这篇文章是自己写的，但是却感觉是东拼西凑的，有很多别人的东西了。&lt;br style="line-height: normal; " /&gt;看了我转载的关于soap 的文章，大家想必对soap有所了解了吧，那么gSOAP是什么那？&lt;br style="line-height: normal; " /&gt;gSOAP 是一个开源的项目，用它可以方便的使用c/c++地进行SOAP客户端和服务器端编程，而不必了解xml和SOAP协议的细节。这样使用者就可以专注于自 己的web service 客户端或服务器端的编写，而不用纠缠与其它细节。我第一次接触这些东西，我对SOAP的理解是这样的：以http协议为基本的通信协议，以xml文件形式 请求远程服务，再以xml文件的形式返回执行结果，我理解的就这么简单了，有啥不妥处，还请指教阿。&lt;br style="line-height: normal; " /&gt;实践一下才有理性认识，下面是我自己在windows下，具体说来就是用vc 6.0下编写的一个很简单的客户端程序调用远程的服务，来发送电子邮件，感觉很爽吧。&lt;br style="line-height: normal; " /&gt;首先我们到&amp;nbsp;&lt;a href="http://sourceforge.net/project/showfiles.php?group_id=52781" target="_blank" style="color: #888888; font-size: 12px; text-decoration: none; line-height: 20px; font-family: Tahoma; "&gt;http://sourceforge.net/project/showfiles.php?group_id=52781&amp;nbsp;&lt;/a&gt;下载gSOAP下载工具集吧，不同的系统下用的gSOAP是不一样的，根据需要下载了windows下的和linux下的。&lt;br style="line-height: normal; " /&gt;gSOAP工具集不需要安装，直接解压就可以了。在/bin目录下我们可以看到两个可执行文件：&lt;br style="line-height: normal; " /&gt;soapcpp2.exe: gSOAP编译器，编译头文件生成服务器和客户端都需要的 c/c++文件。&amp;nbsp;&lt;br style="line-height: normal; " /&gt;wsdl2h.exe: 编译wsdl文件生成c/c++头文件。&lt;br style="line-height: normal; " /&gt;工具就算准备好了。&lt;br style="line-height: normal; " /&gt;其次，我们到&amp;nbsp;&lt;a href="http://www.abysal.com/soap/AbysalEmail.wsdl" target="_blank" style="color: #888888; font-size: 12px; text-decoration: none; line-height: 20px; font-family: Tahoma; "&gt;http://www.abysal.com/soap/AbysalEmail.wsdl&amp;nbsp;&lt;/a&gt;下载&lt;br style="line-height: normal; " /&gt;wsdl文件，假设保存文件名为：AbysalEmail.wsdl。所谓的wsdl文件翻译成中&lt;br style="line-height: normal; " /&gt;文就是网络服务描述文件了。我们用wsdl2h.exe工具来根据wsdl文件生成&lt;br style="line-height: normal; " /&gt;c/c++头文件，可以用-c选项是生成纯c的头文件，另外用-s选项是说明我们在&lt;br style="line-height: normal; " /&gt;程序中不使用stl，注意了默认我们是适用stl的。&lt;br style="line-height: normal; " /&gt;用如下命令：&lt;br style="line-height: normal; " /&gt;wsdl2h&amp;nbsp;&amp;nbsp; --t ../typemap.dat -o AbysalEmail.h AbysalEmail.wsdl&lt;br style="line-height: normal; " /&gt;既可以生成我们需要的AbysalEmail.h头文件了。这里文件名可以随便起了。&lt;br style="line-height: normal; " /&gt;将下载的gsoap的import里的stlvector.h中文件拷贝到当前的文件夹下，因为默认是使用stl的，所以需要它。&lt;br style="line-height: normal; " /&gt;然后执行soapcpp2 命令来生成存根程序，用如下命令：&lt;br style="line-height: normal; " /&gt;soapcpp2&amp;nbsp;&amp;nbsp; -C AbysalEmail.h&lt;br style="line-height: normal; " /&gt;-C&amp;nbsp;&amp;nbsp; 选项是只生成客户端的，默认是生成客户端和服务器端的，如果你在程序中使用了vector还要加上 &amp;#8211;limport选项。&lt;br style="line-height: normal; " /&gt;即可以生存客户端存根程序和框架了。&lt;br style="line-height: normal; " /&gt;soapClient.cpp：编译客户端的需要的存根例程。&lt;br style="line-height: normal; " /&gt;soapC.cpp，soapH.h:用来序列化和反序列化c/c++不同数据类型。&lt;br style="line-height: normal; " /&gt;soapServer.cpp: 编译服务器端的需要的存根例程。&lt;br style="line-height: normal; " /&gt;soapXXXProxy.h: 生成的代理类的头文件,使用代理类时需要此文件。&lt;br style="line-height: normal; " /&gt;本程序为soapSendEmailBindingProxy.h。&lt;br style="line-height: normal; " /&gt;&lt;br style="line-height: normal; " /&gt;第三步，就是在vc中建个工程，设置如下：&lt;br style="line-height: normal; " /&gt;在vc6中建立工程，其源文件为：sendMailClient.cpp soapC.cpp&amp;nbsp;&lt;br style="line-height: normal; " /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; soapClient.cpp stdsoap2.cpp&lt;br style="line-height: normal; " /&gt;头文件为： &amp;nbsp;&amp;nbsp; AbysalEmail.h soapH.h soapStub.h stdsoap2.h &amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;br style="line-height: normal; " /&gt;其他依赖文件为：basetsd.h&amp;nbsp;&amp;nbsp; sendemailbinding.nsmp&lt;br style="line-height: normal; " /&gt;stdsoap2.cpp stdsoap2.h是下载的gSOAP中包含的。&lt;br style="line-height: normal; " /&gt;另外在所需要的库中把wsock32.lib加上，gSOAP也是采用socket方式连接的。&lt;br style="line-height: normal; " /&gt;其中sendMailClient.cpp为我写的客户端程序，程序如下：&lt;br style="line-height: normal; " /&gt;&lt;br style="line-height: normal; " /&gt;#include "soapH.h" &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; // 得到存根程序&lt;br style="line-height: normal; " /&gt;#include "SendEmailBinding.nsmap" &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; //得到名称空间映射表&lt;br style="line-height: normal; " /&gt;#include &amp;lt;iostream&amp;gt;&lt;br style="line-height: normal; " /&gt;#include&amp;nbsp;&amp;nbsp; &amp;lt;string&amp;gt;&lt;br style="line-height: normal; " /&gt;#include "soapSendEmailBindingProxy.h"&lt;br style="line-height: normal; " /&gt;&lt;br style="line-height: normal; " /&gt;using namespace std;&lt;br style="line-height: normal; " /&gt;&lt;br style="line-height: normal; " /&gt;int main(int argc, char **argv)&amp;nbsp;&lt;br style="line-height: normal; " /&gt;{&lt;br style="line-height: normal; " /&gt;struct soap email_soap;&lt;br style="line-height: normal; " /&gt;int result = -1;&lt;br style="line-height: normal; " /&gt;SendEmailBinding&amp;nbsp;&amp;nbsp; EmailBind; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; //生成代理类对象&lt;br style="line-height: normal; " /&gt;_ns1__SendEmail&amp;nbsp;&amp;nbsp; sendEmail; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; //web服务发送电子邮件对象&lt;br style="line-height: normal; " /&gt;_ns1__SendEmailResponse&amp;nbsp;&amp;nbsp; Email_Response;&amp;nbsp;&amp;nbsp; //web 服务返回发送结果对象&lt;br style="line-height: normal; " /&gt;string from = "mseaspring";&lt;br style="line-height: normal; " /&gt;string to = "David";&lt;br style="line-height: normal; " /&gt;string sub = "Hello test!";&lt;br style="line-height: normal; " /&gt;sendEmail.From = &amp;amp;from;&lt;br style="line-height: normal; " /&gt;sendEmail.FromAddress = "&amp;nbsp;&lt;a href="&amp;#109;&amp;#97;&amp;#105;&amp;#108;&amp;#116;&amp;#111;&amp;#58;&amp;#109;&amp;#115;&amp;#101;&amp;#97;&amp;#115;&amp;#112;&amp;#114;&amp;#105;&amp;#110;&amp;#103;&amp;#64;&amp;#104;&amp;#111;&amp;#116;&amp;#109;&amp;#97;&amp;#105;&amp;#108;&amp;#46;&amp;#99;&amp;#111;&amp;#109;" style="color: #888888; font-size: 12px; text-decoration: none; line-height: 20px; font-family: Tahoma; "&gt;mseaspring@hotmail.com&amp;nbsp;&lt;/a&gt;";&lt;br style="line-height: normal; " /&gt;sendEmail.MsgBody = "I want to test a web service!";&lt;br style="line-height: normal; " /&gt;sendEmail.To = &amp;amp;to;&lt;br style="line-height: normal; " /&gt;sendEmail.ToAddress = "&amp;nbsp;&lt;a href="&amp;#109;&amp;#97;&amp;#105;&amp;#108;&amp;#116;&amp;#111;&amp;#58;&amp;#109;&amp;#115;&amp;#101;&amp;#97;&amp;#115;&amp;#112;&amp;#114;&amp;#105;&amp;#110;&amp;#103;&amp;#64;&amp;#103;&amp;#109;&amp;#97;&amp;#105;&amp;#108;&amp;#46;&amp;#99;&amp;#111;&amp;#109;" style="color: #888888; font-size: 12px; text-decoration: none; line-height: 20px; font-family: Tahoma; "&gt;mseaspring@gmail.com&amp;nbsp;&lt;/a&gt;";&lt;br style="line-height: normal; " /&gt;sendEmail.Subject = &amp;#8834;&lt;br style="line-height: normal; " /&gt;&lt;br style="line-height: normal; " /&gt;result = EmailBind.__ns1__SendEmail(&amp;amp;sendEmail,&amp;nbsp;&amp;nbsp; &amp;amp;Email_Response);&lt;br style="line-height: normal; " /&gt;if (result != 0)&lt;br style="line-height: normal; " /&gt;{&lt;br style="line-height: normal; " /&gt;printf("soap error ,errcode = %d\n", result);&lt;br style="line-height: normal; " /&gt;}&lt;br style="line-height: normal; " /&gt;else&lt;br style="line-height: normal; " /&gt;{&lt;br style="line-height: normal; " /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; cout&amp;lt;&amp;lt;"The result is :"&amp;lt;&amp;lt;Email_Response.ReturnCode&amp;lt;&amp;lt;endl;&lt;br style="line-height: normal; " /&gt;cout&amp;lt;&amp;lt;"恭喜你，邮件发送成功！"&amp;lt;&amp;lt;endl;&lt;br style="line-height: normal; " /&gt;}&lt;br style="line-height: normal; " /&gt;return 0;&lt;br style="line-height: normal; " /&gt;}我程序中是采用代理类的方式编写的程序，不用代理类的代码如下：&lt;br style="line-height: normal; " /&gt;#include "soapH.h" &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; //&amp;nbsp;&amp;nbsp; 得到存根程序&lt;br style="line-height: normal; " /&gt;#include "SendEmailBinding.nsmap" &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; // 得到名称空间映射表&lt;br style="line-height: normal; " /&gt;#include &amp;lt;iostream&amp;gt;&lt;br style="line-height: normal; " /&gt;#include&amp;nbsp;&amp;nbsp; &amp;lt;string&amp;gt;&lt;br style="line-height: normal; " /&gt;using namespace std;&lt;br style="line-height: normal; " /&gt;&lt;br style="line-height: normal; " /&gt;int main(int argc, char **argv)&amp;nbsp;&lt;br style="line-height: normal; " /&gt;{&lt;br style="line-height: normal; " /&gt;struct soap email_soap;&lt;br style="line-height: normal; " /&gt;//初始化gSoap运行时环境变量，只需初始化一次&lt;br style="line-height: normal; " /&gt;soap_init(&amp;amp;email_soap);&lt;br style="line-height: normal; " /&gt;int result = -1;&lt;br style="line-height: normal; " /&gt;//远程web服务的endpoint URL&lt;br style="line-height: normal; " /&gt;const char* server="http://www.abysal.com/soap/soapmail.wdtp";&lt;br style="line-height: normal; " /&gt;string from = "mseaspring";&lt;br style="line-height: normal; " /&gt;string to = "David";&lt;br style="line-height: normal; " /&gt;string sub = "Hello test!";&lt;br style="line-height: normal; " /&gt;sendEmail.From = &amp;amp;from;&lt;br style="line-height: normal; " /&gt;sendEmail.FromAddress = "&amp;nbsp;&lt;a href="&amp;#109;&amp;#97;&amp;#105;&amp;#108;&amp;#116;&amp;#111;&amp;#58;&amp;#109;&amp;#115;&amp;#101;&amp;#97;&amp;#115;&amp;#112;&amp;#114;&amp;#105;&amp;#110;&amp;#103;&amp;#64;&amp;#104;&amp;#111;&amp;#116;&amp;#109;&amp;#97;&amp;#105;&amp;#108;&amp;#46;&amp;#99;&amp;#111;&amp;#109;" style="color: #888888; font-size: 12px; text-decoration: none; line-height: 20px; font-family: Tahoma; "&gt;mseaspring@hotmail.com&amp;nbsp;&lt;/a&gt;";&lt;br style="line-height: normal; " /&gt;sendEmail.MsgBody = "I want to test a web service!";&lt;br style="line-height: normal; " /&gt;sendEmail.To = &amp;amp;to;&lt;br style="line-height: normal; " /&gt;sendEmail.ToAddress = "&amp;nbsp;&lt;a href="&amp;#109;&amp;#97;&amp;#105;&amp;#108;&amp;#116;&amp;#111;&amp;#58;&amp;#109;&amp;#115;&amp;#101;&amp;#97;&amp;#115;&amp;#112;&amp;#114;&amp;#105;&amp;#110;&amp;#103;&amp;#64;&amp;#103;&amp;#109;&amp;#97;&amp;#105;&amp;#108;&amp;#46;&amp;#99;&amp;#111;&amp;#109;" style="color: #888888; font-size: 12px; text-decoration: none; line-height: 20px; font-family: Tahoma; "&gt;mseaspring@gmail.com&amp;nbsp;&lt;/a&gt;";&lt;br style="line-height: normal; " /&gt;sendEmail.Subject = &amp;#8834;&lt;br style="line-height: normal; " /&gt;//调用根据远程服务产生函数的接口&lt;br style="line-height: normal; " /&gt;result = soap_call___ns1__SendEmail(&amp;amp;email_soap, server, "", &amp;amp;sendEmail,&amp;nbsp;&amp;nbsp; &amp;amp;Email_Response);&lt;br style="line-height: normal; " /&gt;if(email_soap.error)&lt;br style="line-height: normal; " /&gt;{&lt;br style="line-height: normal; " /&gt;//在stderr流中打印soap的错误信息&lt;br style="line-height: normal; " /&gt;soap_print_fault(&amp;amp;email_soap,stderr);&lt;br style="line-height: normal; " /&gt;result = email_soap.error;&lt;br style="line-height: normal; " /&gt;}&lt;br style="line-height: normal; " /&gt;soap_destroy(&amp;amp;email_soap);// 删除反序列化类的实例,仅用于c++&lt;br style="line-height: normal; " /&gt;soap_end(&amp;amp;email_soap); // 清空已经并行化的数据&lt;br style="line-height: normal; " /&gt;soap_done(&amp;amp;email_soap); // 与gSOAP 环境相分离,关闭连接&lt;br style="line-height: normal; " /&gt;if (result != 0)&lt;br style="line-height: normal; " /&gt;{&lt;br style="line-height: normal; " /&gt;printf("soap error ,errcode = %d\n", result);&lt;br style="line-height: normal; " /&gt;}&lt;br style="line-height: normal; " /&gt;else&lt;br style="line-height: normal; " /&gt;{&lt;br style="line-height: normal; " /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; cout&amp;lt;&amp;lt;"The result is :"&amp;lt;&amp;lt;Email_Response.ReturnCode&amp;lt;&amp;lt;endl;&lt;br style="line-height: normal; " /&gt;cout&amp;lt;&amp;lt;"恭喜你，邮件发送成功！"&amp;lt;&amp;lt;endl;&lt;br style="line-height: normal; " /&gt;}&lt;br style="line-height: normal; " /&gt;return 0;&lt;br style="line-height: normal; " /&gt;}&lt;br style="line-height: normal; " /&gt;你可能会问我怎么知道远程服务的接口阿？ 到soapStub.h中去找就可以了，至于代理类的使用，到代理类头文件中一看便知。&lt;br style="line-height: normal; " /&gt;好了，终于要写完了，当然我们不仅可以编写客户端也可以编写服务器端程序，至于服务器端，有兴趣的可以自己看看gSOAP里面的文档，也很简单的，不过也要花点时间学习的了，呵呵。&lt;br style="line-height: normal; " /&gt;如果对于上面程序，有谁没调试成功联系我，邮箱都写在程序里那。呵呵。&lt;/div&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/span&gt;&lt;/div&gt;&lt;img src="http://www.cnblogs.com/torome/aggbug/1979960.html?type=1" width="1" height="1" alt=""/&gt;&lt;p&gt;&lt;a href="http://www.cnblogs.com/torome/archive/2011/03/10/1979960.html" target="_blank"&gt;本文链接&lt;/a&gt;&lt;/p&gt;</content></entry><entry><id>http://www.cnblogs.com/torome/archive/2011/03/10/1979944.html</id><title type="text">js的comet各个浏览器封装lib</title><summary type="text">SimpleComet是一个轻量级的comet的封装类, 能智能的识别浏览器,应用不同的comet技术,在firefox浏览器上使用ajax，在IE、opera浏览器上使用htmlfile,iframe.&amp;lt;script type=&amp;quot;text/javascript&amp;quot;&amp;gt; // This function will be called every time the server pushes a new event. function push(event) { // For this example, we simply show the excuse on the</summary><published>2011-03-10T08:27:00Z</published><updated>2011-03-10T08:27:00Z</updated><author><name>torome</name><uri>http://www.cnblogs.com/torome/</uri></author><link rel="alternate" href="http://www.cnblogs.com/torome/archive/2011/03/10/1979944.html"/><link rel="alternate" type="text/html" href="http://www.cnblogs.com/torome/archive/2011/03/10/1979944.html"/><content type="html">&lt;div&gt;&lt;span style="color: #434343; font-family: 宋体, arial; font-size: 12px; line-height: normal; "&gt;&lt;p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 15px; padding-left: 0px; line-height: 18px; "&gt;SimpleComet是一个轻量级的comet的封装类, 能智能的识别浏览器,应用不同的comet技术,在firefox浏览器上使用ajax，在IE、opera浏览器上使用htmlfile,iframe.&lt;/p&gt;&lt;pre style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 10px; padding-right: 3px; padding-bottom: 10px; padding-left: 3px; font-family: Monaco, Courier, monospace; font-size: 12px; overflow-x: auto; overflow-y: auto; white-space: pre-wrap; word-wrap: break-word; background-color: #ffffff; width: 590px; "&gt;&lt;span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: black; font-size: 12px; "&gt;&amp;lt;script type="text/javascript"&amp;gt;&lt;/span&gt;&lt;span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: #888888; font-size: 12px; "&gt; // This function will be called every time the server pushes a new event.&lt;/span&gt; &lt;span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: #9a6f1b; font-size: 12px; "&gt;function&lt;/span&gt; push&lt;span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: #444444; font-size: 12px; "&gt;(&lt;/span&gt;event&lt;span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: #444444; font-size: 12px; "&gt;)&lt;/span&gt; &lt;span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: #444444; font-size: 12px; "&gt;{&lt;/span&gt; &lt;span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: #888888; font-size: 12px; "&gt;	// For this example, we simply show the excuse on the page.&lt;/span&gt; 	document.&lt;span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: #666666; font-size: 12px; "&gt;getElementById&lt;/span&gt;&lt;span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: #444444; font-size: 12px; "&gt;(&lt;/span&gt;&lt;span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: #489a1b; font-size: 12px; "&gt;'excuse'&lt;/span&gt;&lt;span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: #444444; font-size: 12px; "&gt;)&lt;/span&gt;.&lt;span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: #666666; font-size: 12px; "&gt;innerHTML&lt;/span&gt; &lt;span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: #444444; font-size: 12px; "&gt;=&lt;/span&gt; event&lt;span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: #444444; font-size: 12px; "&gt;;&lt;/span&gt; &lt;span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: #444444; font-size: 12px; "&gt;}&lt;/span&gt;  &lt;span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: #888888; font-size: 12px; "&gt; // This function will be called when/if the stream closes.&lt;/span&gt; &lt;span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: #9a6f1b; font-size: 12px; "&gt;function&lt;/span&gt; disconnected&lt;span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: #444444; font-size: 12px; "&gt;(&lt;/span&gt;&lt;span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: #444444; font-size: 12px; "&gt;)&lt;/span&gt; &lt;span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: #444444; font-size: 12px; "&gt;{&lt;/span&gt; &lt;span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: #888888; font-size: 12px; "&gt;	// For this example we'll just show a nice message.&lt;/span&gt; 	document.&lt;span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: #666666; font-size: 12px; "&gt;getElementById&lt;/span&gt;&lt;span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: #444444; font-size: 12px; "&gt;(&lt;/span&gt;&lt;span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: #489a1b; font-size: 12px; "&gt;'excuse'&lt;/span&gt;&lt;span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: #444444; font-size: 12px; "&gt;)&lt;/span&gt;.&lt;span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: #666666; font-size: 12px; "&gt;innerHTML&lt;/span&gt; &lt;span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: #444444; font-size: 12px; "&gt;=&lt;/span&gt; &lt;span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: #489a1b; font-size: 12px; "&gt;'&amp;lt;img src="img/arrow.png" alt="" title="" /&amp;gt;'&lt;/span&gt;&lt;span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: #444444; font-size: 12px; "&gt;+&lt;/span&gt; 		&lt;span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: #489a1b; font-size: 12px; "&gt;' Click to see MORE reasons why this souldn\'t work!'&lt;/span&gt;&lt;span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: #444444; font-size: 12px; "&gt;;&lt;/span&gt; 	document.&lt;span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: #666666; font-size: 12px; "&gt;getElementById&lt;/span&gt;&lt;span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: #444444; font-size: 12px; "&gt;(&lt;/span&gt;&lt;span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: #489a1b; font-size: 12px; "&gt;'control'&lt;/span&gt;&lt;span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: #444444; font-size: 12px; "&gt;)&lt;/span&gt;.&lt;span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: #666666; font-size: 12px; "&gt;value&lt;/span&gt; &lt;span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: #444444; font-size: 12px; "&gt;=&lt;/span&gt; &lt;span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: #489a1b; font-size: 12px; "&gt;'start'&lt;/span&gt;&lt;span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: #444444; font-size: 12px; "&gt;;&lt;/span&gt; &lt;span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: #444444; font-size: 12px; "&gt;}&lt;/span&gt;  &lt;span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: #888888; font-size: 12px; "&gt; // This function is executed when the button is clicked.&lt;/span&gt; &lt;span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: #9a6f1b; font-size: 12px; "&gt;function&lt;/span&gt; toggle&lt;span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: #444444; font-size: 12px; "&gt;(&lt;/span&gt;&lt;span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: #444444; font-size: 12px; "&gt;)&lt;/span&gt; &lt;span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: #444444; font-size: 12px; "&gt;{&lt;/span&gt; &lt;span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: #888888; font-size: 12px; "&gt;	// First we check if the stream is open.&lt;/span&gt; 	&lt;span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: #1b609a; font-size: 12px; "&gt;if&lt;/span&gt; &lt;span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: #444444; font-size: 12px; "&gt;(&lt;/span&gt;&lt;span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: #444444; font-size: 12px; "&gt;!&lt;/span&gt;comet.&lt;span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: #666666; font-size: 12px; "&gt;active&lt;/span&gt;&lt;span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: #444444; font-size: 12px; "&gt;)&lt;/span&gt; &lt;span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: #444444; font-size: 12px; "&gt;{&lt;/span&gt; 	&lt;span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: #888888; font-size: 12px; "&gt;	// Lets start streaming!&lt;/span&gt; 		comet.&lt;span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: #666666; font-size: 12px; "&gt;open&lt;/span&gt;&lt;span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: #444444; font-size: 12px; "&gt;(&lt;/span&gt;&lt;span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: #489a1b; font-size: 12px; "&gt;'excuses.php'&lt;/span&gt;&lt;span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: #444444; font-size: 12px; "&gt;,&lt;/span&gt; push&lt;span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: #444444; font-size: 12px; "&gt;,&lt;/span&gt; disconnected&lt;span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: #444444; font-size: 12px; "&gt;)&lt;/span&gt;&lt;span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: #444444; font-size: 12px; "&gt;;&lt;/span&gt; 		document.&lt;span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: #666666; font-size: 12px; "&gt;getElementById&lt;/span&gt;&lt;span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: #444444; font-size: 12px; "&gt;(&lt;/span&gt;&lt;span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: #489a1b; font-size: 12px; "&gt;'control'&lt;/span&gt;&lt;span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: #444444; font-size: 12px; "&gt;)&lt;/span&gt;.&lt;span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: #666666; font-size: 12px; "&gt;value&lt;/span&gt; &lt;span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: #444444; font-size: 12px; "&gt;=&lt;/span&gt; &lt;span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: #489a1b; font-size: 12px; "&gt;'stop'&lt;/span&gt;&lt;span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: #444444; font-size: 12px; "&gt;;&lt;/span&gt; 	&lt;span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: #444444; font-size: 12px; "&gt;}&lt;/span&gt; &lt;span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: #1b609a; font-size: 12px; "&gt;else&lt;/span&gt; &lt;span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: #444444; font-size: 12px; "&gt;{&lt;/span&gt; 	&lt;span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: #888888; font-size: 12px; "&gt;	// Streaming is active, means the user wants to stop it.&lt;/span&gt; 		comet.&lt;span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: #666666; font-size: 12px; "&gt;close&lt;/span&gt;&lt;span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: #444444; font-size: 12px; "&gt;(&lt;/span&gt;&lt;span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: #444444; font-size: 12px; "&gt;)&lt;/span&gt;&lt;span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: #444444; font-size: 12px; "&gt;;&lt;/span&gt; 	&lt;span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: #444444; font-size: 12px; "&gt;}&lt;/span&gt; &lt;span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: #444444; font-size: 12px; "&gt;}&lt;/span&gt; &lt;span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: black; font-size: 12px; "&gt;&amp;lt;/script&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;br style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; " /&gt;&lt;pre style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 10px; padding-right: 3px; padding-bottom: 10px; padding-left: 3px; font-family: Monaco, Courier, monospace; font-size: 12px; overflow-x: auto; overflow-y: auto; white-space: pre-wrap; word-wrap: break-word; background-color: #ffffff; width: 590px; "&gt;&amp;lt;!--?&lt;span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: #9a6f1b; font-size: 12px; "&gt;php&lt;/span&gt;  &lt;span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: #888888; font-size: 12px; "&gt; // First we load the SimpleComet PHP class and the list of excuses.&lt;/span&gt; &lt;span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: #666666; font-size: 12px; "&gt;require&lt;/span&gt;&lt;span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: #444444; font-size: 12px; "&gt;(&lt;/span&gt;&lt;span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: #489a1b; font-size: 12px; "&gt;'inc/simplecomet.class.php'&lt;/span&gt;&lt;span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: #444444; font-size: 12px; "&gt;)&lt;/span&gt;; &lt;span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: #784e0c; font-size: 12px; "&gt;$comet&lt;/span&gt; = &lt;span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: #1b609a; font-size: 12px; "&gt;new&lt;/span&gt; &lt;span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: #666666; font-size: 12px; "&gt;SimpleComet&lt;/span&gt;&lt;span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: #444444; font-size: 12px; "&gt;(&lt;/span&gt;&lt;span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: #444444; font-size: 12px; "&gt;)&lt;/span&gt;; &lt;span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: #784e0c; font-size: 12px; "&gt;$excuses&lt;/span&gt; = &lt;span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: #666666; font-size: 12px; "&gt;file&lt;/span&gt;&lt;span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: #444444; font-size: 12px; "&gt;(&lt;/span&gt;&lt;span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: #489a1b; font-size: 12px; "&gt;'inc/excuses.txt'&lt;/span&gt;&lt;span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: #444444; font-size: 12px; "&gt;)&lt;/span&gt;;  &lt;span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: #888888; font-size: 12px; "&gt; // This is an infinite loop, which makes the stream endless.&lt;/span&gt; &lt;span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: #666666; font-size: 12px; "&gt;while&lt;/span&gt; &lt;span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: #444444; font-size: 12px; "&gt;(&lt;/span&gt;&lt;span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: #9a6f1b; font-size: 12px; "&gt;true&lt;/span&gt;&lt;span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: #444444; font-size: 12px; "&gt;)&lt;/span&gt; &lt;span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: #444444; font-size: 12px; "&gt;{&lt;/span&gt; &lt;span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: #888888; font-size: 12px; "&gt;	// We fetch an excuse at random.&lt;/span&gt; 	&lt;span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: #784e0c; font-size: 12px; "&gt;$excuse&lt;/span&gt; = &lt;span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: #666666; font-size: 12px; "&gt;trim&lt;/span&gt;&lt;span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: #444444; font-size: 12px; "&gt;(&lt;/span&gt;&lt;span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: #784e0c; font-size: 12px; "&gt;$excuses&lt;/span&gt;&lt;span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: #444444; font-size: 12px; "&gt;[&lt;/span&gt;&lt;span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: #666666; font-size: 12px; "&gt;rand&lt;/span&gt;&lt;span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: #444444; font-size: 12px; "&gt;(&lt;/span&gt;&lt;span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: #70483d; font-size: 12px; "&gt;0&lt;/span&gt;, &lt;span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: #666666; font-size: 12px; "&gt;count&lt;/span&gt;&lt;span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: #444444; font-size: 12px; "&gt;(&lt;/span&gt;&lt;span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: #784e0c; font-size: 12px; "&gt;$excuses&lt;/span&gt;&lt;span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: #444444; font-size: 12px; "&gt;)&lt;/span&gt;&lt;span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: #444444; font-size: 12px; "&gt;)&lt;/span&gt;&lt;span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: #444444; font-size: 12px; "&gt;]&lt;/span&gt;&lt;span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: #444444; font-size: 12px; "&gt;)&lt;/span&gt;; &lt;span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: #888888; font-size: 12px; "&gt;	// If the excuse is too long, we get another one.&lt;/span&gt; 	&lt;span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: #666666; font-size: 12px; "&gt;if&lt;/span&gt; &lt;span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: #444444; font-size: 12px; "&gt;(&lt;/span&gt;&lt;span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: #666666; font-size: 12px; "&gt;strlen&lt;/span&gt;&lt;span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: #444444; font-size: 12px; "&gt;(&lt;/span&gt;&lt;span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: #784e0c; font-size: 12px; "&gt;$excuse&lt;/span&gt;&lt;span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: #444444; font-size: 12px; "&gt;)&lt;/span&gt; --&amp;gt; &lt;span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: #70483d; font-size: 12px; "&gt;60&lt;/span&gt;&lt;span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: #444444; font-size: 12px; "&gt;)&lt;/span&gt; &lt;span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: #444444; font-size: 12px; "&gt;{&lt;/span&gt; &lt;span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: #1b609a; font-size: 12px; "&gt;continue&lt;/span&gt;; &lt;span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: #444444; font-size: 12px; "&gt;}&lt;/span&gt; &lt;span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: #888888; font-size: 12px; "&gt;	// Finally, we push our excuse to the client.&lt;/span&gt; 	&lt;span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: #784e0c; font-size: 12px; "&gt;$comet&lt;/span&gt;-&amp;gt;&lt;span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: #784e0c; font-size: 12px; "&gt;push&lt;/span&gt;&lt;span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: #444444; font-size: 12px; "&gt;(&lt;/span&gt;&lt;span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: #784e0c; font-size: 12px; "&gt;$excuse&lt;/span&gt;&lt;span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: #444444; font-size: 12px; "&gt;)&lt;/span&gt;; &lt;span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: #888888; font-size: 12px; "&gt;	// 5 seconds delay before the next excuse.&lt;/span&gt; 	&lt;span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: #666666; font-size: 12px; "&gt;sleep&lt;/span&gt;&lt;span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: #444444; font-size: 12px; "&gt;(&lt;/span&gt;&lt;span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: #70483d; font-size: 12px; "&gt;5&lt;/span&gt;&lt;span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: #444444; font-size: 12px; "&gt;)&lt;/span&gt;; &lt;span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: #444444; font-size: 12px; "&gt;}&lt;/span&gt;   &lt;span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: black; font-size: 12px; "&gt;?&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 15px; padding-left: 0px; line-height: 18px; "&gt;&lt;br style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; " /&gt;simplecomet能监听出链接是否已经断了,是不是很智能，只要负责服务端的输出就行.&amp;nbsp;&lt;br style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; " /&gt;下载:&amp;nbsp;&lt;a href="http://www.mandor.net/files/simplecomet-1.0.zip" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-weight: 900; text-decoration: none; color: #1e3b78; "&gt;http://www.mandor.net/files/simplecomet-1.0.zip&lt;/a&gt;&lt;/p&gt;&lt;/span&gt;&lt;/div&gt;&lt;img src="http://www.cnblogs.com/torome/aggbug/1979944.html?type=1" width="1" height="1" alt=""/&gt;&lt;p&gt;&lt;a href="http://www.cnblogs.com/torome/archive/2011/03/10/1979944.html" target="_blank"&gt;本文链接&lt;/a&gt;&lt;/p&gt;</content></entry><entry><id>http://www.cnblogs.com/torome/archive/2007/10/04/914365.html</id><title type="text">原来CASTLE RC2 还不支持IBATIS 1.6，郁闷了很久</title><summary type="text">原来CASTLE RC2 还不支持IBATIS 1.6，郁闷了很久</summary><published>2007-10-04T15:43:00Z</published><updated>2007-10-04T15:43:00Z</updated><author><name>torome</name><uri>http://www.cnblogs.com/torome/</uri></author><link rel="alternate" href="http://www.cnblogs.com/torome/archive/2007/10/04/914365.html"/><link rel="alternate" type="text/html" href="http://www.cnblogs.com/torome/archive/2007/10/04/914365.html"/></entry><entry><id>http://www.cnblogs.com/torome/archive/2007/03/15/675916.html</id><title type="text">卡斯特：中国是一个全球化的大试验</title><summary type="text">卡斯特：中国是一个全球化的大试验&amp;#8220;过去20年，中国一头扎入全球化的进程。与北京这种超级发展的都会相比，洛杉矶都像是小村庄了。中国经历了改变，同时也改变了世界。这不仅仅是因为中国的文化和历史，也不仅仅是因为人口数量，而是因为中国发展的特定方式，代表了全球化的所有前提、问题和潜力。中国一方面有最迅速的经济增长，另一方面有最大规模的人口边缘化、区域的边缘化。各国家各领域的人都在谈论中国，因为...</summary><published>2007-03-15T06:25:00Z</published><updated>2007-03-15T06:25:00Z</updated><author><name>torome</name><uri>http://www.cnblogs.com/torome/</uri></author><link rel="alternate" href="http://www.cnblogs.com/torome/archive/2007/03/15/675916.html"/><link rel="alternate" type="text/html" href="http://www.cnblogs.com/torome/archive/2007/03/15/675916.html"/></entry><entry><id>http://www.cnblogs.com/torome/archive/2007/03/15/675890.html</id><title type="text">谁是农业信息化的第一推动力</title><summary type="text">谁是农业信息化的第一推动力 作者： 转载自《每周电脑报》Monday, January 17 2005 2:21 PM编者按：与三农问题相比，农业信息化似乎微不足道。但我们仍然认为，农业信息化有朝一日将成为提高农村竞争力的致胜砝码，为此，我们组织了关于农业信息化的第三次专题报道。虽然我们已经欣喜地看到先富裕起来的农民借助信息技术帮助自己更快地创造着财富、增加着收入，并且先行一步享受着信息技术带来的...</summary><published>2007-03-15T06:14:00Z</published><updated>2007-03-15T06:14:00Z</updated><author><name>torome</name><uri>http://www.cnblogs.com/torome/</uri></author><link rel="alternate" href="http://www.cnblogs.com/torome/archive/2007/03/15/675890.html"/><link rel="alternate" type="text/html" href="http://www.cnblogs.com/torome/archive/2007/03/15/675890.html"/></entry><entry><id>http://www.cnblogs.com/torome/archive/2007/03/14/674467.html</id><title type="text">硬盘数据恢复原理与方法</title><summary type="text">硬盘数据恢复原理与方法　　我们大家可能都遇到过这样的事情，上午刚刚清空垃圾站，下午却突然想起其中有个文件特别重要，这可怎么办？还有可能系统被病毒破坏，硬盘的分区表或文件分配表被病毒改写，但是硬盘上存着你数年的心血。这时我们就需要对数据进行恢复，而国内也有不少专门从事数据恢复业务的专业公司。不过我们的硬盘发生文件被误删除，分区丢失，病毒破坏等情况，通过一些数据恢复软件自己就能够解决。下面就详细介绍一...</summary><published>2007-03-14T05:34:00Z</published><updated>2007-03-14T05:34:00Z</updated><author><name>torome</name><uri>http://www.cnblogs.com/torome/</uri></author><link rel="alternate" href="http://www.cnblogs.com/torome/archive/2007/03/14/674467.html"/><link rel="alternate" type="text/html" href="http://www.cnblogs.com/torome/archive/2007/03/14/674467.html"/></entry><entry><id>http://www.cnblogs.com/torome/archive/2007/03/01/660695.html</id><title type="text">用QQWry.Dat作数据源实现IP地址检索</title><summary type="text">用QQWry.Dat作数据源实现IP地址检索以www.cz88.net上的qqwry.dat作为数据源(更新比较快,去该网站上可以获取最新的数据),/Files/torome/qqwry.rar</summary><published>2007-03-01T12:39:00Z</published><updated>2007-03-01T12:39:00Z</updated><author><name>torome</name><uri>http://www.cnblogs.com/torome/</uri></author><link rel="alternate" href="http://www.cnblogs.com/torome/archive/2007/03/01/660695.html"/><link rel="alternate" type="text/html" href="http://www.cnblogs.com/torome/archive/2007/03/01/660695.html"/></entry></feed>
