<?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>theboy的起居注 &#187; 技术</title>
	<atom:link href="http://qijuzhu.cn/category/%e6%8a%80%e6%9c%af/feed/" rel="self" type="application/rss+xml" />
	<link>http://qijuzhu.cn</link>
	<description>我们的生活有这么多的障碍，真他妈的有意思，这种逻辑就叫做黑色幽默。</description>
	<lastBuildDate>Tue, 21 Sep 2010 07:57:04 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Objective-C 2.0学习笔记之NSMutableArray</title>
		<link>http://qijuzhu.cn/objective-c-2-0%e5%ad%a6%e4%b9%a0%e7%ac%94%e8%ae%b0%e4%b9%8bnsmutablearray/</link>
		<comments>http://qijuzhu.cn/objective-c-2-0%e5%ad%a6%e4%b9%a0%e7%ac%94%e8%ae%b0%e4%b9%8bnsmutablearray/#comments</comments>
		<pubDate>Sat, 21 Aug 2010 08:25:51 +0000</pubDate>
		<dc:creator>theboy</dc:creator>
				<category><![CDATA[技术]]></category>
		<category><![CDATA[Objective-C]]></category>

		<guid isPermaLink="false">http://qijuzhu.cn/?p=1376</guid>
		<description><![CDATA[?View Code C#import &#60;Foundation/Foundation.h&#62; &#160; int main &#40;int argc, const char * argv&#91;&#93;&#41; &#123; NSAutoreleasePool * pool = &#91;&#91;NSAutoreleasePool alloc&#93; init&#93;; int i; NSArray *row=&#91;NSArray arrayWithObjects:@&#34;duoduoluo&#34;,@&#34;theboy&#34;,@&#34;longmao&#34;,nil&#93;; NSMutableArray *array;//定义一个可变数组 array=&#91;NSMutableArray arrayWithCapacity:3&#93;;//定义数组长度 &#91;array addObjectsFromArray:row&#93;;//增加 &#91;array removeObjectAtIndex:1&#93;;//删除 for&#40;i=0;i&#60;&#91;array count&#93;;i++&#41; &#123; NSLog&#40;@&#34;%@&#34;,&#91;array objectAtIndex:i&#93;&#41;; &#125; &#91;pool drain&#93;; return 0; &#125; output: [Session started at 2010-08-21 16:20:58 +0800.] 2010-08-21 16:20:58.395 nsstring[688:903] [...]]]></description>
			<content:encoded><![CDATA[
<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p1376code2'); return false;">View Code</a> C</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p13762"><td class="code" id="p1376code2"><pre class="c" style="font-family:monospace;"><span style="color: #339933;">#import &lt;Foundation/Foundation.h&gt;</span>
&nbsp;
<span style="color: #993333;">int</span> main <span style="color: #009900;">&#40;</span><span style="color: #993333;">int</span> argc<span style="color: #339933;">,</span> <span style="color: #993333;">const</span> <span style="color: #993333;">char</span> <span style="color: #339933;">*</span> argv<span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
   NSAutoreleasePool <span style="color: #339933;">*</span> pool <span style="color: #339933;">=</span> <span style="color: #009900;">&#91;</span><span style="color: #009900;">&#91;</span>NSAutoreleasePool alloc<span style="color: #009900;">&#93;</span> init<span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
	<span style="color: #993333;">int</span> i<span style="color: #339933;">;</span>
	NSArray <span style="color: #339933;">*</span>row<span style="color: #339933;">=</span><span style="color: #009900;">&#91;</span>NSArray arrayWithObjects<span style="color: #339933;">:</span>@<span style="color: #ff0000;">&quot;duoduoluo&quot;</span><span style="color: #339933;">,</span>@<span style="color: #ff0000;">&quot;theboy&quot;</span><span style="color: #339933;">,</span>@<span style="color: #ff0000;">&quot;longmao&quot;</span><span style="color: #339933;">,</span>nil<span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
	NSMutableArray <span style="color: #339933;">*</span>array<span style="color: #339933;">;</span><span style="color: #666666; font-style: italic;">//定义一个可变数组</span>
	array<span style="color: #339933;">=</span><span style="color: #009900;">&#91;</span>NSMutableArray arrayWithCapacity<span style="color: #339933;">:</span><span style="color: #0000dd;">3</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span><span style="color: #666666; font-style: italic;">//定义数组长度</span>
	<span style="color: #009900;">&#91;</span>array addObjectsFromArray<span style="color: #339933;">:</span>row<span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span><span style="color: #666666; font-style: italic;">//增加</span>
	<span style="color: #009900;">&#91;</span>array removeObjectAtIndex<span style="color: #339933;">:</span><span style="color: #0000dd;">1</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span><span style="color: #666666; font-style: italic;">//删除</span>
	<span style="color: #b1b100;">for</span><span style="color: #009900;">&#40;</span>i<span style="color: #339933;">=</span><span style="color: #0000dd;">0</span><span style="color: #339933;">;</span>i<span style="color: #339933;">&lt;</span><span style="color: #009900;">&#91;</span>array count<span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>i<span style="color: #339933;">++</span><span style="color: #009900;">&#41;</span>
	<span style="color: #009900;">&#123;</span>
		NSLog<span style="color: #009900;">&#40;</span>@<span style="color: #ff0000;">&quot;%@&quot;</span><span style="color: #339933;">,</span><span style="color: #009900;">&#91;</span>array objectAtIndex<span style="color: #339933;">:</span>i<span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
	<span style="color: #009900;">&#91;</span>pool drain<span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
    <span style="color: #b1b100;">return</span> <span style="color: #0000dd;">0</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></td></tr></table></div>

<p>output:</p>
<p>[Session started at 2010-08-21 16:20:58 +0800.]<br />
2010-08-21 16:20:58.395 nsstring[688:903] duoduoluo<br />
2010-08-21 16:20:58.400 nsstring[688:903] longmao</p>
<p>The Debugger has exited with status 0.</p>
<p>NSArray:(immutable)</p>
<p>   在创建的时候,就包含了所有对象.你不能增加或是删除其中任何一个对象.这种特定称为: immutable.</p>
<p>   1.  &#8211; (unsigned)count 得到array中的对象个数.</p>
<p>   2.  -(id)objectAtIndex:(unsigned)i 得到索引为i的对象.如果i值超过了array对象数量,在程序运行到这里会产生错误.</p>
<p>   3.  -(id)lastObject 得到最后一个对象.如果NSArray中没有任何对象存在,返回nil.</p>
<p>   4.  -(BOOL)containsObject:(id)anObject 当anObject出现在NSArray中,则返回YES.</p>
<p>   5.  -(unsigned)indexOfObject:(id)anObject查找NSArray中是否存在anObject, 并返回最小的索引值.</p>
<p>NSMutableArray:</p>
<p>    NSMutableArray继承NSArray,扩展了增加,删除对象的功能. 可以使用NSArray的mutableCopy方法来复制得到一个可修改的NSMutableArray对象.</p>
<p>    1.  &#8211; (void)addObject:(id)anObject 在reciever最后添加anObject. 添加nil是非法的.</p>
<p>    2.  &#8211; (void)addObjectsFromArray:(NSArray *)otherArray 在reciever最后,把otherArray中的对象都依次添加进去.</p>
<p>    3.  &#8211; (void)insertObject:(id)anObject atIndex:(unsigned)index 在索引index处插入对象anObject. 如果index被占用,会把之后的object向后<a href="http://yuansui.com/"target="_blank"title="中国移动网上营业厅" >移动</a>. index不能大于所包含对象个数,并且anObject不能为空.</p>
<p>    4.  &#8211; (void)removeAllObjects 清空array.</p>
<p>    5.  &#8211; (void)removeObject:(id)anObject 删除所有和anObject相等的对象.</p>
<p>    6.  &#8211; (void)removeObjectAtIndex:(unsigned)index 删除索引为index的对象.后面的对象依次往前移.如果index越界,将会产生错误.</p>
]]></content:encoded>
			<wfw:commentRss>http://qijuzhu.cn/objective-c-2-0%e5%ad%a6%e4%b9%a0%e7%ac%94%e8%ae%b0%e4%b9%8bnsmutablearray/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Objective-C 2.0学习笔记之NSMutableString</title>
		<link>http://qijuzhu.cn/objective-c-2-0%e5%ad%a6%e4%b9%a0%e7%ac%94%e8%ae%b0%e4%b9%8bnsmutablestring/</link>
		<comments>http://qijuzhu.cn/objective-c-2-0%e5%ad%a6%e4%b9%a0%e7%ac%94%e8%ae%b0%e4%b9%8bnsmutablestring/#comments</comments>
		<pubDate>Wed, 18 Aug 2010 09:31:18 +0000</pubDate>
		<dc:creator>theboy</dc:creator>
				<category><![CDATA[技术]]></category>
		<category><![CDATA[Objective-C 2.0]]></category>

		<guid isPermaLink="false">http://qijuzhu.cn/?p=1374</guid>
		<description><![CDATA[?View Code C#import &#60;Foundation/Foundation.h&#62; &#160; int main &#40;int argc, const char * argv&#91;&#93;&#41; &#123; NSAutoreleasePool * pool = &#91;&#91;NSAutoreleasePool alloc&#93; init&#93;; //+ (id) stringWithFormat: (NSString *) format,...; NSMutableString *friends=&#91;NSMutableString stringWithCapacity:50&#93;; &#91;friends appendFormat:@&#34;I love duoduoluo,and you?&#34;&#93;; NSRange range=&#91;friends rangeOfString:@&#34;you&#34;&#93;; range.length++; &#91;friends deleteCharactersInRange:range&#93;; NSLog&#40;@&#34;%@&#34;,friends&#41;; &#91;pool drain&#93;; return 0; &#125; 输出:[Session started at 2010-08-18 17:25:58 +0800.] 2010-08-18 17:25:58.802 [...]]]></description>
			<content:encoded><![CDATA[
<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p1374code4'); return false;">View Code</a> C</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p13744"><td class="code" id="p1374code4"><pre class="c" style="font-family:monospace;"><span style="color: #339933;">#import &lt;Foundation/Foundation.h&gt;</span>
&nbsp;
<span style="color: #993333;">int</span> main <span style="color: #009900;">&#40;</span><span style="color: #993333;">int</span> argc<span style="color: #339933;">,</span> <span style="color: #993333;">const</span> <span style="color: #993333;">char</span> <span style="color: #339933;">*</span> argv<span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    NSAutoreleasePool <span style="color: #339933;">*</span> pool <span style="color: #339933;">=</span> <span style="color: #009900;">&#91;</span><span style="color: #009900;">&#91;</span>NSAutoreleasePool alloc<span style="color: #009900;">&#93;</span> init<span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
	<span style="color: #666666; font-style: italic;">//+ (id) stringWithFormat: (NSString *) format,...;</span>
    NSMutableString <span style="color: #339933;">*</span>friends<span style="color: #339933;">=</span><span style="color: #009900;">&#91;</span>NSMutableString stringWithCapacity<span style="color: #339933;">:</span><span style="color: #0000dd;">50</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#91;</span>friends appendFormat<span style="color: #339933;">:</span>@<span style="color: #ff0000;">&quot;I love duoduoluo,and you?&quot;</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
	NSRange range<span style="color: #339933;">=</span><span style="color: #009900;">&#91;</span>friends rangeOfString<span style="color: #339933;">:</span>@<span style="color: #ff0000;">&quot;you&quot;</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
	range.<span style="color: #202020;">length</span><span style="color: #339933;">++;</span>
	<span style="color: #009900;">&#91;</span>friends deleteCharactersInRange<span style="color: #339933;">:</span>range<span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
	NSLog<span style="color: #009900;">&#40;</span>@<span style="color: #ff0000;">&quot;%@&quot;</span><span style="color: #339933;">,</span>friends<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#91;</span>pool drain<span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
    <span style="color: #b1b100;">return</span> <span style="color: #0000dd;">0</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></td></tr></table></div>

<p>输出:[Session started at 2010-08-18 17:25:58 +0800.]<br />
2010-08-18 17:25:58.802 nsstring[148:903] I love duoduoluo,and </p>
<p>The Debugger has exited with status 0</p>
]]></content:encoded>
			<wfw:commentRss>http://qijuzhu.cn/objective-c-2-0%e5%ad%a6%e4%b9%a0%e7%ac%94%e8%ae%b0%e4%b9%8bnsmutablestring/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Objective_c学习笔记之NSRange</title>
		<link>http://qijuzhu.cn/objective_c%e5%ad%a6%e4%b9%a0%e7%ac%94%e8%ae%b0%e4%b9%8bnsrange/</link>
		<comments>http://qijuzhu.cn/objective_c%e5%ad%a6%e4%b9%a0%e7%ac%94%e8%ae%b0%e4%b9%8bnsrange/#comments</comments>
		<pubDate>Tue, 17 Aug 2010 08:29:54 +0000</pubDate>
		<dc:creator>theboy</dc:creator>
				<category><![CDATA[技术]]></category>
		<category><![CDATA[Objective_c]]></category>

		<guid isPermaLink="false">http://qijuzhu.cn/?p=1370</guid>
		<description><![CDATA[?View Code C#import &#60;Foundation/Foundation.h&#62; &#160; int main &#40;int argc, const char * argv&#91;&#93;&#41; &#123; NSAutoreleasePool * pool = &#91;&#91;NSAutoreleasePool alloc&#93; init&#93;; &#160; NSString *homeword=@&#34;I love duoduoluo&#34;;//字符串 NSRange range=NSMakeRange&#40;3, 8&#41;;//范围从3开始选取8个字符 NSRange range2=&#91;homeword rangeOfString:@&#34;duoduo&#34;&#93;;//判断是否存在此字符串 if&#40;range2.length&#62;0&#41;&#123; &#160; NSLog&#40;@&#34;%@&#34;,NSStringFromRange&#40;range2&#41;&#41;;//输出行列 &#125; NSLog&#40;@&#34;%@&#34;,&#91;homeword substringWithRange:range&#93;&#41;;//输出截取的字符串 &#91;pool drain&#93;; return 0; &#125; 输出： [Session started at 2010-08-17 16:29:14 +0800.] 2010-08-17 16:29:15.003 nsstring[257:903] {7, 6} [...]]]></description>
			<content:encoded><![CDATA[
<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p1370code6'); return false;">View Code</a> C</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p13706"><td class="code" id="p1370code6"><pre class="c" style="font-family:monospace;"><span style="color: #339933;">#import &lt;Foundation/Foundation.h&gt;</span>
&nbsp;
<span style="color: #993333;">int</span> main <span style="color: #009900;">&#40;</span><span style="color: #993333;">int</span> argc<span style="color: #339933;">,</span> <span style="color: #993333;">const</span> <span style="color: #993333;">char</span> <span style="color: #339933;">*</span> argv<span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    NSAutoreleasePool <span style="color: #339933;">*</span> pool <span style="color: #339933;">=</span> <span style="color: #009900;">&#91;</span><span style="color: #009900;">&#91;</span>NSAutoreleasePool alloc<span style="color: #009900;">&#93;</span> init<span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
&nbsp;
    NSString <span style="color: #339933;">*</span>homeword<span style="color: #339933;">=</span>@<span style="color: #ff0000;">&quot;I love duoduoluo&quot;</span><span style="color: #339933;">;</span><span style="color: #666666; font-style: italic;">//字符串</span>
	NSRange range<span style="color: #339933;">=</span>NSMakeRange<span style="color: #009900;">&#40;</span><span style="color: #0000dd;">3</span><span style="color: #339933;">,</span> <span style="color: #0000dd;">8</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><span style="color: #666666; font-style: italic;">//范围从3开始选取8个字符</span>
	NSRange range2<span style="color: #339933;">=</span><span style="color: #009900;">&#91;</span>homeword rangeOfString<span style="color: #339933;">:</span>@<span style="color: #ff0000;">&quot;duoduo&quot;</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span><span style="color: #666666; font-style: italic;">//判断是否存在此字符串</span>
	<span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span>range2.<span style="color: #202020;">length</span><span style="color: #339933;">&gt;</span><span style="color: #0000dd;">0</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
&nbsp;
		NSLog<span style="color: #009900;">&#40;</span>@<span style="color: #ff0000;">&quot;%@&quot;</span><span style="color: #339933;">,</span>NSStringFromRange<span style="color: #009900;">&#40;</span>range2<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><span style="color: #666666; font-style: italic;">//输出行列</span>
	<span style="color: #009900;">&#125;</span>
	NSLog<span style="color: #009900;">&#40;</span>@<span style="color: #ff0000;">&quot;%@&quot;</span><span style="color: #339933;">,</span><span style="color: #009900;">&#91;</span>homeword substringWithRange<span style="color: #339933;">:</span>range<span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><span style="color: #666666; font-style: italic;">//输出截取的字符串</span>
    <span style="color: #009900;">&#91;</span>pool drain<span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
    <span style="color: #b1b100;">return</span> <span style="color: #0000dd;">0</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></td></tr></table></div>

<p>输出：<br />
[Session started at 2010-08-17 16:29:14 +0800.]<br />
2010-08-17 16:29:15.003 nsstring[257:903] {7, 6}<br />
2010-08-17 16:29:15.007 nsstring[257:903] ove duod</p>
<p>The Debugger has exited with status 0.</p>
]]></content:encoded>
			<wfw:commentRss>http://qijuzhu.cn/objective_c%e5%ad%a6%e4%b9%a0%e7%ac%94%e8%ae%b0%e4%b9%8bnsrange/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Objective-C 2.0学习笔记之略有成就</title>
		<link>http://qijuzhu.cn/objective-c-2-0%e5%ad%a6%e4%b9%a0%e7%ac%94%e8%ae%b0%e4%b9%8b%e7%95%a5%e6%9c%89%e6%88%90%e5%b0%b1/</link>
		<comments>http://qijuzhu.cn/objective-c-2-0%e5%ad%a6%e4%b9%a0%e7%ac%94%e8%ae%b0%e4%b9%8b%e7%95%a5%e6%9c%89%e6%88%90%e5%b0%b1/#comments</comments>
		<pubDate>Tue, 10 Aug 2010 16:17:54 +0000</pubDate>
		<dc:creator>theboy</dc:creator>
				<category><![CDATA[技术]]></category>
		<category><![CDATA[Objective-C]]></category>

		<guid isPermaLink="false">http://qijuzhu.cn/?p=1362</guid>
		<description><![CDATA[学了这么多天的Objective-C，终于照书上的代码写出了一个小程序，功能简单的简直可笑，只是实现了字母的大小写转换。 虽然我对面向对象理解还行，但是因为没C基础，所以学起来Objective-C还是非常吃力的。不过最艰难的地方已经过去了。再不会像前几天一样天天痛苦的Debug了。]]></description>
			<content:encoded><![CDATA[<p>学了这么多天的Objective-C，终于照书上的代码写出了一个小程序，功能简单的简直可笑，只是实现了字母的大小写转换。</p>
<p style="text-align: center;"><a href="http://qijuzhu.cn/wp-content/uploads/2010/08/objectivec.jpg"><img title="objectivec" src="http://qijuzhu.cn/wp-content/uploads/2010/08/objectivec.jpg" alt="Objective-C" width="664" height="463" /></a></p>
<p>虽然我对面向对象理解还行，但是因为没C基础，所以学起来Objective-C还是非常吃力的。不过最艰难的地方已经过去了。再不会像前几天一样天天痛苦的Debug了。</p>
]]></content:encoded>
			<wfw:commentRss>http://qijuzhu.cn/objective-c-2-0%e5%ad%a6%e4%b9%a0%e7%ac%94%e8%ae%b0%e4%b9%8b%e7%95%a5%e6%9c%89%e6%88%90%e5%b0%b1/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Russian Art Collectors</title>
		<link>http://qijuzhu.cn/russian-art-collectors/</link>
		<comments>http://qijuzhu.cn/russian-art-collectors/#comments</comments>
		<pubDate>Fri, 06 Aug 2010 08:03:32 +0000</pubDate>
		<dc:creator>theboy</dc:creator>
				<category><![CDATA[技术]]></category>
		<category><![CDATA[Russian Art Collectors]]></category>

		<guid isPermaLink="false">http://qijuzhu.cn/?p=1340</guid>
		<description><![CDATA[我一高中死党，现在不一小心成了美国人。我和我同事称美国为美怪。所以他是美怪人。他老爷子（什么概念？）是美怪最大的俄罗斯油画经销商，旗下网站Russian Art Collectors。我仔细看了这个Russian Art Collectors，SEO做得非常差，正好我这美怪的同学让我帮忙给这个站做SEO。不过暂时还没发给我FTP，我只能做外链去提高排名。 这幅画很像我小时候生活的村子，原图在这里。]]></description>
			<content:encoded><![CDATA[<p>我一高中死党，现在不一小心成了美国人。我和我同事称美国为美怪。所以他是美怪人。他老爷子（什么概念？）是美怪最大的俄罗斯油画经销商，旗下网站<a title="Russian Art Collectors" href="http://mccartheygallery.net/" target="_blank">Russian Art Collectors</a>。我仔细看了这个Russian Art Collectors，<a href="http://qijuzhu.cn/tag/seo/"target="_blank"title="seo" >SEO</a>做得非常差，正好我这美怪的同学让我帮忙给这个站做SEO。不过暂时还没发给我FTP，我只能做外链去提高排名。</p>
<p style="text-align: center;"><a href="http://qijuzhu.cn/wp-content/uploads/2010/08/Russian-Art-Collectors.jpg"><img class="aligncenter" title="Russian Art Collectors" src="http://qijuzhu.cn/wp-content/uploads/2010/08/Russian-Art-Collectors.jpg" alt="Russian Art Collectors.jpg" width="443" height="315" /></a></p>
<p>这幅画很像我小时候生活的村子，原图在<a href="http://www.mccartheygallery.net/images/stories/home-stories/Gritsai.jpg">这里</a>。</p>
]]></content:encoded>
			<wfw:commentRss>http://qijuzhu.cn/russian-art-collectors/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>SOSO快照回档</title>
		<link>http://qijuzhu.cn/soso%e5%bf%ab%e7%85%a7%e5%9b%9e%e6%a1%a3/</link>
		<comments>http://qijuzhu.cn/soso%e5%bf%ab%e7%85%a7%e5%9b%9e%e6%a1%a3/#comments</comments>
		<pubDate>Thu, 05 Aug 2010 00:53:43 +0000</pubDate>
		<dc:creator>theboy</dc:creator>
				<category><![CDATA[技术]]></category>
		<category><![CDATA[seo]]></category>

		<guid isPermaLink="false">http://qijuzhu.cn/?p=1337</guid>
		<description><![CDATA[我前些日子做了一个小的SEO项目，用来测试域名的权重。主关键词是中国移动网上营业厅,今天看流量的时候发现SOSO的快照回档到2000-04-20。 不知道出现这样的情况是不是SOSO在做调整。]]></description>
			<content:encoded><![CDATA[<p>我前些日子做了一个小的<a href="http://qijuzhu.cn/tag/seo/"target="_blank"title="seo" >SEO</a>项目，用来测试域名的权重。主关键词是<a href="http://yuansui.com">中国移动网上营业厅</a>,今天看流量的时候发现SOSO的快照回档到2000-04-20。</p>
<p style="text-align: center;"><a href="http://qijuzhu.cn/wp-content/uploads/2010/08/soso.jpg"><img class="aligncenter" title="soso" src="http://qijuzhu.cn/wp-content/uploads/2010/08/soso.jpg" alt="soso快照回档" width="284" height="117" /></a></p>
<p>不知道出现这样的情况是不是SOSO在做调整。</p>
]]></content:encoded>
			<wfw:commentRss>http://qijuzhu.cn/soso%e5%bf%ab%e7%85%a7%e5%9b%9e%e6%a1%a3/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>我所使用的FireFox插件</title>
		<link>http://qijuzhu.cn/%e6%88%91%e6%89%80%e4%bd%bf%e7%94%a8%e7%9a%84firefox%e6%8f%92%e4%bb%b6/</link>
		<comments>http://qijuzhu.cn/%e6%88%91%e6%89%80%e4%bd%bf%e7%94%a8%e7%9a%84firefox%e6%8f%92%e4%bb%b6/#comments</comments>
		<pubDate>Fri, 30 Jul 2010 00:36:42 +0000</pubDate>
		<dc:creator>theboy</dc:creator>
				<category><![CDATA[技术]]></category>
		<category><![CDATA[firefox]]></category>

		<guid isPermaLink="false">http://qijuzhu.cn/?p=1320</guid>
		<description><![CDATA[FireFox之所以成为我的首选浏览器，就因为它的众多而且强大的插件机制，下面推荐几个我必装的插件。如果你想查找更多的插件，请访问FireFox附加组件中心。 首先要推荐的就是久负盛名的FireBug，捉虫专用，我在小白的烦恼里面提到的页面兼容性问题大多都是通过FireBug调试的。 第二个要推荐的是HttpFox，是用来抓取数据包的，用它来寻找youku tudou视频的源地址再简单不过了。我通常用它来获取POST数据。 最后强力推荐是FireFox书签同步工具Xmarks Sync，如果你和我一样，家里电脑上面也经常用FireFox，那么这个Xmarks就是你用来同步你的收藏夹的最好插件。如果您在多台机器上的使用 Firefox ，您就会用到 Foxmarks。在每一台机器上安装 Foxmarks，它会在后台安静的工作，保持书签的同步。您也可以登录到 my.foxmarks.com 来管理您的书签。当然你需要注册一个账户才可以同步你的书签。我最近一直在用Xmarks，感觉非常惬意。 当然插件安装过多会影响FireFox的运行速度，大家请按量取食。]]></description>
			<content:encoded><![CDATA[<p>FireFox之所以成为我的首选浏览器，就因为它的众多而且强大的插件机制，下面推荐几个我必装的插件。如果你想查找更多的插件，请访问<a href="https://addons.mozilla.org/zh-CN/firefox/">FireFox附加组件中心</a>。</p>
<p style="text-align: center;"><a href="http://qijuzhu.cn/wp-content/uploads/2010/07/firefox_plug.jpg"><img class="aligncenter" title="firefox_plug" src="http://qijuzhu.cn/wp-content/uploads/2010/07/firefox_plug.jpg" alt="FireFox插件" width="407" height="390" /></a></p>
<p>首先要推荐的就是久负盛名的<a href="https://addons.mozilla.org/zh-CN/firefox/addon/1843/">FireBug</a>，捉虫专用，我在<a href="http://qijuzhu.cn/%e5%b0%8f%e7%99%bd%e7%9a%84%e7%83%a6%e6%81%bc/">小白的烦恼</a>里面提到的页面兼容性问题大多都是通过FireBug调试的。<br />
第二个要推荐的是<a href="https://addons.mozilla.org/zh-CN/firefox/addon/6647/">HttpFox</a>，是用来抓取数据包的，用它来寻找youku tudou视频的源地址再简单不过了。我通常用它来获取POST数据。</p>
<p style="text-align: center;"><a href="http://qijuzhu.cn/wp-content/uploads/2010/07/httpfox.jpg"><img class="aligncenter" title="httpfox" src="http://qijuzhu.cn/wp-content/uploads/2010/07/httpfox.jpg" alt="HttpFox" width="456" height="268" /></a><br />
<a href="http://qijuzhu.cn/wp-content/uploads/2010/07/youkump4.jpg"><img title="youkump4" src="http://qijuzhu.cn/wp-content/uploads/2010/07/youkump4.jpg" alt="HttpFox_youku" width="515" height="141" /></a></p>
<p>最后强力推荐是FireFox书签同步工具<a href="https://addons.mozilla.org/zh-CN/firefox/addon/2410/">Xmarks Sync</a>，如果你和我一样，家里电脑上面也经常用FireFox，那么这个Xmarks就是你用来同步你的收藏夹的最好插件。如果您在多台机器上的使用 Firefox ，您就会用到 Foxmarks。在每一台机器上安装 Foxmarks，它会在后台安静的工作，保持书签的同步。您也可以登录到 my.foxmarks.com 来管理您的书签。当然你需要<a href="http://login.xmarks.com/account/create_account">注册一个账户</a>才可以同步你的书签。我最近一直在用Xmarks，感觉非常惬意。</p>
<p style="text-align: center;"><a href="http://qijuzhu.cn/wp-content/uploads/2010/07/xmarks.jpg"><img class="aligncenter" title="xmarks" src="http://qijuzhu.cn/wp-content/uploads/2010/07/xmarks.jpg" alt="Xmarks" width="548" height="138" /></a></p>
<p>当然插件安装过多会影响FireFox的运行速度，大家请按量取食。</p>
]]></content:encoded>
			<wfw:commentRss>http://qijuzhu.cn/%e6%88%91%e6%89%80%e4%bd%bf%e7%94%a8%e7%9a%84firefox%e6%8f%92%e4%bb%b6/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>关于Google Reader</title>
		<link>http://qijuzhu.cn/%e5%85%b3%e4%ba%8egoogle-reader/</link>
		<comments>http://qijuzhu.cn/%e5%85%b3%e4%ba%8egoogle-reader/#comments</comments>
		<pubDate>Thu, 29 Jul 2010 15:05:18 +0000</pubDate>
		<dc:creator>theboy</dc:creator>
				<category><![CDATA[技术]]></category>
		<category><![CDATA[Google]]></category>

		<guid isPermaLink="false">http://qijuzhu.cn/?p=1309</guid>
		<description><![CDATA[Google Reader又叫Google阅读器，是Google提供的一个RSS在线阅读工具。平时我们上网，会发现大部分的博客上都提供有RSS订阅的地址，Google Reader就是用来在线阅读这些Feed的一个工具。可能有一部分人还没用过Google Reader，不过在读完我的这篇博客，建议你一定要试一试Google Reader。 使用Google Reader首先要有一个Google账户，如果你正好有一个Gmail，那么你现在就可以访问用你Gmail的账号和密码登录Google Reader。如果没有，那么你得申请一个。 首次登录Google Reader，你的订阅列表是空的。那么如何添加订阅呢？首先你要找到你想要订阅的网站或博客的RSS地址，如我的博客的RSS地址是http://qijuzhu.cn/feed/，复制这个地址，在Google Reader点击左侧的添加订阅，粘贴刚才复制的地址，稍等几秒就成功了，就这么简单。 如何阅读已经订阅的RSS？如果你和我一样，关注SEO，域名出售，前端开发，喜欢和菜头和韩寒，喜欢看亲朋好友同事的博客，那么你肯定是一下就订阅了好多个Feed。 我现在是把Google Reader设为主页，每天打开网页的时候就可以看到订阅的RSS有没有更新，如上图，有更新的RSS会以黑色加粗显示，点开后在右侧可以看到未读的文章和条数： 如果你用了Google Reader，就再也不用挨个儿点开网站去看关注的网站更新没有。同时RSS是XML格式的，一般不会出现广告，很大程度上避免了广告的干扰。 当然Google Reader还有很多功能，比如快捷键等等，如果你想知道的更多，请猛点这里。 我所关注的胖子，和菜头，终于从网上觅得无码真人照片两张，特此帖出，以飨读者。]]></description>
			<content:encoded><![CDATA[<p><a href="http://qijuzhu.cn/tag/google/"target="_blank"title="google" >Google</a> Reader又叫Google阅读器，是Google提供的一个RSS在线阅读工具。平时我们上网，会发现大部分的<a href="http://qijuzhu.cn"target="_blank"title="博客" >博客</a>上都提供有RSS订阅的地址，<a href="http://reader.google.com/"target="_blank"title="Google Reader" >Google Reader</a>就是用来在线阅读这些Feed的一个工具。可能有一部分人还没用过Google Reader，不过在读完我的这篇博客，建议你一定要试一试Google Reader。</p>
<p>使用Google Reader首先要有一个Google账户，如果你正好有一个Gmail，那么你现在就可以访问用你Gmail的账号和<a href="http://qijuzhu.cn/%e8%97%8f%e5%9c%b0%e5%af%86%e7%a0%81-6txt%e4%b8%8b%e8%bd%bd/"target="_blank"title="藏地密码" >密码</a>登录Google Reader。如果没有，那么你得<a href="https://www.google.com/accounts/ServiceLogin?service=reader&amp;passive=1209600&amp;continue=http://www.google.com/reader/&amp;followup=http://www.google.com/reader/">申请一个</a>。</p>
<p>首次登录Google Reader，你的订阅列表是空的。那么如何添加订阅呢？首先你要找到你想要订阅的网站或博客的RSS地址，如我的博客的RSS地址是http://qijuzhu.cn/feed/，复制这个地址，在Google Reader点击左侧的添加订阅，粘贴刚才复制的地址，稍等几秒就成功了，就这么简单。</p>
<p style="text-align: center;"><a href="http://qijuzhu.cn/wp-content/uploads/2010/07/addrss.jpg"><img class="aligncenter" title="addrss" src="http://qijuzhu.cn/wp-content/uploads/2010/07/addrss.jpg" alt="" width="303" height="151" /></a></p>
<p>如何阅读已经订阅的RSS？如果你和我一样，关注<a href="http://qijuzhu.cn/tag/seo/"target="_blank"title="seo" >SEO</a>，域名出售，前端开发，喜欢和菜头和韩寒，喜欢看亲朋好友同事的博客，那么你肯定是一下就订阅了好多个Feed。</p>
<p style="text-align: center;"><a href="http://qijuzhu.cn/wp-content/uploads/2010/07/rsslist.jpg"><img class="aligncenter" title="rsslist" src="http://qijuzhu.cn/wp-content/uploads/2010/07/rsslist.jpg" alt="" width="257" height="545" /></a></p>
<p>我现在是把Google Reader设为主页，每天打开网页的时候就可以看到订阅的RSS有没有更新，如上图，有更新的RSS会以黑色加粗显示，点开后在右侧可以看到未读的文章和条数：</p>
<p style="text-align: center;"><a href="http://qijuzhu.cn/wp-content/uploads/2010/07/rssupdate.jpg"><img class="aligncenter" title="rssupdate" src="http://qijuzhu.cn/wp-content/uploads/2010/07/rssupdate.jpg" alt="" width="558" height="202" /></a></p>
<p>如果你用了Google Reader，就再也不用挨个儿点开网站去看关注的网站更新没有。同时RSS是XML格式的，一般不会出现广告，很大程度上避免了广告的干扰。<br />
当然Google Reader还有很多功能，比如快捷键等等，如果你想知道的更多，请猛点<a href="http://www.google.com/support/reader/?hl=zh-CN">这里</a>。<br />
我所关注的胖子，<a href="http://www.hecaitou.com/blogs/hecaitou/Rss.aspx">和菜头</a>，终于从网上觅得无码真人照片两张，特此帖出，以飨读者。</p>
<p style="text-align: center;"><a href="http://qijuzhu.cn/wp-content/uploads/2010/07/hecaitou1.jpg"><img class="aligncenter" title="hecaitou1" src="http://qijuzhu.cn/wp-content/uploads/2010/07/hecaitou1.jpg" alt="和菜头" width="168" height="200" /></a><br />
<a href="http://qijuzhu.cn/wp-content/uploads/2010/07/hecaitou2.jpg"><img title="hecaitou2" src="http://qijuzhu.cn/wp-content/uploads/2010/07/hecaitou2.jpg" alt="和菜头无码照" width="460" height="306" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://qijuzhu.cn/%e5%85%b3%e4%ba%8egoogle-reader/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Seoer的出路</title>
		<link>http://qijuzhu.cn/seoer%e7%9a%84%e5%87%ba%e8%b7%af/</link>
		<comments>http://qijuzhu.cn/seoer%e7%9a%84%e5%87%ba%e8%b7%af/#comments</comments>
		<pubDate>Tue, 27 Jul 2010 12:38:32 +0000</pubDate>
		<dc:creator>theboy</dc:creator>
				<category><![CDATA[技术]]></category>
		<category><![CDATA[seo]]></category>

		<guid isPermaLink="false">http://qijuzhu.cn/?p=1287</guid>
		<description><![CDATA[在上次A5举行的seo大赛中，我认识了做郑州SEO的e小武,他现在成了我的同事，我身边多了一个可以交流SEO心得的人。 今天下午下班后我和e小武一起去吃饭，谈起Seoer的未来，我俩都觉得很茫然。Seoer一般致力于网站流量的提升，大部分时候网站是靠网络广告来赚钱的，我算了一下，如果网站每天有15W pv，做google adsense一天的收入大约是60美元（这个点击率已经非常高了，大部分网站都到不了这个点击率），那么每月的收入是1800美元。 而大多数网站每天的PV没有超过1000，就以每天PV1000来算，你挣够60美元要150000/1000=150天，150天正好是5个月，算下来连空间和域名的本钱都不够。 Seoer另外一个出路是做Seo咨询，以提供Seo服务来挣钱，这样，Seo咨询是一个服务行业，如果是一个人做，会非常的累，光外链都能让你死几回。除非你有足够的名气，可以骗来钱。就和王通一样。 我在一个不大不小不老不小的地方门户站全职做Seo,近来找我做咨询的人非常之多，目的也非常明确，就是提高流量。前来咨询的人大都有自己的产品，所以他们应该咨询的不是Seo,而是Sem。Sem比Seo更有前途，所以Seoer要多关注Sem。 e小武说他准备做Seo培训，我觉得这是个非常不错的出路。e小武在这次博百优大赛中也算出了名，以后靠名气骗钱也有了资本。在郑州做Seo培训的据说只有一家，竞争小；而且做Seo培训风险也小，做Seo的可控性非常差，但做Seo培训的可控性就非常高，见效也快。这个应该是Seoer比较好的一个出路。]]></description>
			<content:encoded><![CDATA[<p>在上次<a href="http://admin5.com/">A5</a>举行的<a href="http://bbs.admin5.com/forum-428-1.html">seo大赛</a>中，我认识了做<a href="http://www.wulongjie.com" target="_blank">郑州SEO</a>的<a href="http://www.wulongjie.com">e小武</a>,他现在成了我的同事，我身边多了一个可以交流<a href="http://qijuzhu.cn/tag/seo/"target="_blank"title="seo" >SEO</a>心得的人。</p>
<p>今天下午下班后我和e小武一起去吃饭，谈起Seoer的未来，我俩都觉得很茫然。Seoer一般致力于网站流量的提升，大部分时候网站是靠网络广告来赚钱的，我算了一下，如果网站每天有15W pv，做<a href="http://qijuzhu.cn/tag/google/"target="_blank"title="google" >google</a> adsense一天的收入大约是60美元（这个点击率已经非常高了，大部分网站都到不了这个点击率），那么每月的收入是1800美元。</p>
<p style="text-align: center;"><a href="http://qijuzhu.cn/wp-content/uploads/2010/07/adsense1.jpg"><img class="aligncenter" title="adsense" src="http://qijuzhu.cn/wp-content/uploads/2010/07/adsense1.jpg" alt="" width="556" height="243" /></a></p>
<p>而大多数网站每天的PV没有超过1000，就以每天PV1000来算，你挣够60美元要150000/1000=150天，150天正好是5个月，算下来连空间和域名的本钱都不够。</p>
<p>Seoer另外一个出路是做Seo咨询，以提供Seo服务来挣钱，这样，Seo咨询是一个服务行业，如果是一个人做，会非常的累，光外链都能让你死几回。除非你有足够的名气，可以骗来钱。就和王通一样。</p>
<p>我在一个不大不小不老不小的地方门户站全职做Seo,近来找我做咨询的人非常之多，目的也非常明确，就是提高流量。前来咨询的人大都有自己的产品，所以他们应该咨询的不是Seo,而是Sem。Sem比Seo更有前途，所以Seoer要多关注Sem。</p>
<p>e小武说他准备做Seo培训，我觉得这是个非常不错的出路。e小武在这次<a href="http://bbs.admin5.com/forum-428-1.html">博百优</a>大赛中也算出了名，以后靠名气骗钱也有了资本。在郑州做Seo培训的据说只有一家，竞争小；而且做Seo培训风险也小，做Seo的可控性非常差，但做Seo培训的可控性就非常高，见效也快。这个应该是Seoer比较好的一个出路。</p>
]]></content:encoded>
			<wfw:commentRss>http://qijuzhu.cn/seoer%e7%9a%84%e5%87%ba%e8%b7%af/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Google 翻译 API 之php运用(Google Translate)</title>
		<link>http://qijuzhu.cn/google-%e7%bf%bb%e8%af%91-api-%e4%b9%8bphp%e8%bf%90%e7%94%a8google-translate/</link>
		<comments>http://qijuzhu.cn/google-%e7%bf%bb%e8%af%91-api-%e4%b9%8bphp%e8%bf%90%e7%94%a8google-translate/#comments</comments>
		<pubDate>Thu, 01 Jul 2010 09:20:17 +0000</pubDate>
		<dc:creator>theboy</dc:creator>
				<category><![CDATA[技术]]></category>
		<category><![CDATA[Google]]></category>

		<guid isPermaLink="false">http://qijuzhu.cn/?p=1278</guid>
		<description><![CDATA[前几天运用Google AJAX 语言 API写过一个javascript的google翻译程序，今天又写了一个php版本的。主要代码如下，用了curl函数去读取返回的数据。 ?View Code PHP&#60;?php $q=rawurlencode&#40;&#34;我是中国人&#34;&#41;; $slan=&#34;zh&#34;;//要翻译的语言 $glan=&#34;en&#34;;//目标语言 $api=&#34;http://ajax.googleapis.com/ajax/services/language/translate?v=1.0&#38;q=&#34;.$q.&#34;&#38;langpair=&#34;.$slan.&#34;&#124;&#34;.$glan;//apiurl $curl=curl_init&#40;&#41;; curl_setopt&#40;$curl,CURLOPT_URL,$api&#41;;//通过curl读取 curl_setopt&#40;$curl,CURLOPT_RETURNTRANSFER,1&#41;; $content=curl_exec&#40;$curl&#41;; $trans_arr=explode&#40;&#34;:&#34;,$content&#41;;//对返回的字符串进行处理 $final_arr=explode&#40;&#34;&#34;&#34;,$trans_arr[2]);//对返回的字符串进行处理 echo $trans_text=$final_arr[1];//输出翻译后的文字 //输出I am a Chinese ?&#62; 代码我都注释过了。我在网上看到别人写的是用正则去处理返回的数据，我用了两个explode去处理，自己感觉这样方便一些。]]></description>
			<content:encoded><![CDATA[<p>前几天运用<a href="http://code.google.com/intl/zh-CN/apis/ajaxlanguage/documentation/reference.html">Google AJAX 语言 API</a>写过一个javascript的google翻译程序，今天又写了一个php版本的。主要代码如下，用了curl函数去读取返回的数据。</p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p1278code8'); return false;">View Code</a> PHP</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p12788"><td class="code" id="p1278code8"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span>
	<span style="color: #000088;">$q</span><span style="color: #339933;">=</span><a href="http://www.php.net/rawurlencode"><span style="color: #990000;">rawurlencode</span></a><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;我是中国人&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #000088;">$slan</span><span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;zh&quot;</span><span style="color: #339933;">;</span><span style="color: #666666; font-style: italic;">//要翻译的语言</span>
	<span style="color: #000088;">$glan</span><span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;en&quot;</span><span style="color: #339933;">;</span><span style="color: #666666; font-style: italic;">//目标语言</span>
	<span style="color: #000088;">$api</span><span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;http://ajax.googleapis.com/ajax/services/language/translate?v=1.0&amp;q=&quot;</span><span style="color: #339933;">.</span><span style="color: #000088;">$q</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;&amp;langpair=&quot;</span><span style="color: #339933;">.</span><span style="color: #000088;">$slan</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;|&quot;</span><span style="color: #339933;">.</span><span style="color: #000088;">$glan</span><span style="color: #339933;">;</span><span style="color: #666666; font-style: italic;">//apiurl</span>
	<span style="color: #000088;">$curl</span><span style="color: #339933;">=</span><a href="http://www.php.net/curl_init"><span style="color: #990000;">curl_init</span></a><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<a href="http://www.php.net/curl_setopt"><span style="color: #990000;">curl_setopt</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$curl</span><span style="color: #339933;">,</span>CURLOPT_URL<span style="color: #339933;">,</span><span style="color: #000088;">$api</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><span style="color: #666666; font-style: italic;">//通过curl读取</span>
	<a href="http://www.php.net/curl_setopt"><span style="color: #990000;">curl_setopt</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$curl</span><span style="color: #339933;">,</span>CURLOPT_RETURNTRANSFER<span style="color: #339933;">,</span><span style="color: #cc66cc;">1</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #000088;">$content</span><span style="color: #339933;">=</span><a href="http://www.php.net/curl_exec"><span style="color: #990000;">curl_exec</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$curl</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #000088;">$trans_arr</span><span style="color: #339933;">=</span><a href="http://www.php.net/explode"><span style="color: #990000;">explode</span></a><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;:&quot;</span><span style="color: #339933;">,</span><span style="color: #000088;">$content</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><span style="color: #666666; font-style: italic;">//对返回的字符串进行处理</span>
	<span style="color: #000088;">$final_arr</span><span style="color: #339933;">=</span><a href="http://www.php.net/explode"><span style="color: #990000;">explode</span></a><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;&quot;</span><span style="color: #0000ff;">&quot;,<span style="color: #006699; font-weight: bold;">$trans_arr[2]</span>);//对返回的字符串进行处理
	echo <span style="color: #006699; font-weight: bold;">$trans_text</span>=<span style="color: #006699; font-weight: bold;">$final_arr[1]</span>;//输出翻译后的文字
	//输出I am a Chinese
	?&gt;</span></pre></td></tr></table></div>

<p>代码我都注释过了。我在网上看到别人写的是<a href="http://blog.smdcn.net/article/483.html">用正则去处理返回的数据</a>，我用了两个explode去处理，自己感觉这样方便一些。</p>
]]></content:encoded>
			<wfw:commentRss>http://qijuzhu.cn/google-%e7%bf%bb%e8%af%91-api-%e4%b9%8bphp%e8%bf%90%e7%94%a8google-translate/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

