<?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>Li(ttle)URL.cn</title>
	<atom:link href="http://blog.liurl.cn/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.liurl.cn</link>
	<description>Behind the scene's at LiURL.cn</description>
	<lastBuildDate>Sat, 25 Apr 2009 04:07:38 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>萧闳仁&#8217;s latest CD</title>
		<link>http://blog.liurl.cn/2009/04/%e8%90%a7%e9%97%b3%e4%bb%81s-latest-cd/</link>
		<comments>http://blog.liurl.cn/2009/04/%e8%90%a7%e9%97%b3%e4%bb%81s-latest-cd/#comments</comments>
		<pubDate>Sat, 25 Apr 2009 03:43:42 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Tao Bao]]></category>
		<category><![CDATA[gift ideas]]></category>
		<category><![CDATA[taobao]]></category>
		<category><![CDATA[河蟹]]></category>
		<category><![CDATA[法可U]]></category>
		<category><![CDATA[萧闳仁]]></category>

		<guid isPermaLink="false">http://blog.liurl.cn/?p=51</guid>
		<description><![CDATA[Well, its the weekend, and its a beautiful day in Shanghai, so what am I doing?
Writing more blog posts!  Its a hard life  
As the Grass Mud Horse Phenomenon has apparently peaked, the internet has moved onto other things.
Taiwanese musician 萧闳仁 has released a new CD imaginatively called 法可这个人, which is available for [...]]]></description>
			<content:encoded><![CDATA[<p>Well, its the weekend, and its a beautiful day in Shanghai, so what am I doing?</p>
<p>Writing more blog posts!  Its a hard life <img src='http://blog.liurl.cn/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>As the Grass Mud Horse Phenomenon has apparently peaked, the internet has moved onto other things.</p>
<p>Taiwanese musician 萧闳仁 has released a new CD imaginatively called 法可这个人, which is available for a moderate price on Taobao.<br />
<a href="http://liurl.cn/1bs">This seller</a> has one for 5RMB in Shanghai.</p>
<p>Watch the video below for another way to get past the river crabs (河蟹), er harmonizers.<br />
If you are a non Chinese literate reader, then listen to the song all the way through in order to get the message.</p>
<p>For the impatient, scroll through to about 2:30 for the main verse.</p>
<p>If the video below isn&#8217;t playing for you, try the link to YouKu here instead -<a href="http://v.youku.com/v_show/id_XODM3NzQyODg=.html"> 萧闳仁 － 法可这个人</a></p>
<p style="text-align: center;"><object width="480" height="400" data="http://www.tudou.com/v/bXUjn4rzyRA" type="application/x-shockwave-flash"><param name="src" value="http://www.tudou.com/v/bXUjn4rzyRA" /></object></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.liurl.cn/2009/04/%e8%90%a7%e9%97%b3%e4%bb%81s-latest-cd/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Cool Stuff &#124; Fridgelingo Chinese Fridge Magnets</title>
		<link>http://blog.liurl.cn/2009/04/cool-stuff-fridgelingo-chinese-fridge-magnets/</link>
		<comments>http://blog.liurl.cn/2009/04/cool-stuff-fridgelingo-chinese-fridge-magnets/#comments</comments>
		<pubDate>Tue, 21 Apr 2009 04:18:40 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Shopping]]></category>
		<category><![CDATA[Site Related]]></category>
		<category><![CDATA[ayi]]></category>
		<category><![CDATA[cool hunting]]></category>
		<category><![CDATA[fridge magnets]]></category>
		<category><![CDATA[fridgelingo]]></category>
		<category><![CDATA[iwantone]]></category>
		<category><![CDATA[shanghainese]]></category>

		<guid isPermaLink="false">http://blog.liurl.cn/?p=46</guid>
		<description><![CDATA[While I&#8217;m aware that its usually a little skeezy promoting your own stuff, this is actually quite a cool product that we designed in-house.
iWantOne.cn has some cool Fridge Magnet sets for those wanting to learn Chinese (or English).

The first set is available now, and includes phrases useful for talking to your ayi.
The idea came about [...]]]></description>
			<content:encoded><![CDATA[<p>While I&#8217;m aware that its usually a little skeezy promoting your own stuff, this is actually quite a cool product that we designed in-house.</p>
<p><a href="http://www.iWantOne.cn">iWantOne.cn</a> has some cool Fridge Magnet sets for those wanting to learn Chinese (or English).</p>
<p><img src="http://blog.liurl.cn/wp-content/uploads/2009/04/127-259-large.jpg" alt="Fridge Lingo :: Set #1 - Talking to your Ayi" title="Fridge Lingo :: Set #1 - Talking to your Ayi" width="300" height="300" class="aligncenter size-full wp-image-48" /></p>
<p>The first set is available now, and includes phrases useful for talking to your ayi.</p>
<p>The idea came about from a client &#8211; who asked why we didn&#8217;t put some English translation on our <a href="http://liurl.cn/0ah">Shanghainese</a> or <a href="http://liurl.cn/0ai">Mandarin</a> badges.<br />
(Yes, we do have a <a href="http://liurl.cn/a9">Grass Mud Horse</a> badge, for those that read the New York Times).</p>
<p>I thought about it for a while, and remembered the fridge poetry craze from a few years ago, and had the seminal idea to make a magnet set with Chinese, English and Pinyin translations.</p>
<p>A month or three and many prototypes later, we finally had a product.</p>
<p>That my i could also finally tell the Ayi to clean under the sofa was also a bonus!</p>
<p>Link here: <a href="http://liurl.cn/eu">http://liurl.cn/eu</a></p>
<p><strong>Disclaimer &#8211; Our parent company owns <a href="http://www.iwantone.cn">iWantOne</a>. and <a href="http://www.fridgelingo.com">FridgeLingo</a>.</strong></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.liurl.cn/2009/04/cool-stuff-fridgelingo-chinese-fridge-magnets/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>LiURL.cn sightings</title>
		<link>http://blog.liurl.cn/2009/04/liurlcn-sightings/</link>
		<comments>http://blog.liurl.cn/2009/04/liurlcn-sightings/#comments</comments>
		<pubDate>Tue, 21 Apr 2009 03:53:29 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[API]]></category>
		<category><![CDATA[Sightings (LiURL.cn in the wild)]]></category>
		<category><![CDATA[3rd party]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[script]]></category>
		<category><![CDATA[twitter]]></category>

		<guid isPermaLink="false">http://blog.liurl.cn/?p=43</guid>
		<description><![CDATA[As I&#8217;m keen to see more use of LiURL.cn, I do keep an eye on logs to see who&#8217;s linking to us.
Johan Sundström over at  userscripts.org  has written a php short url services expansion script which includes LiURL.cn.
The script is here:
http://userscripts.org/scripts/review/46822
http://longurl.org has also added support for expanding url&#8217;s.  Thanks Sean!
Also, a warm [...]]]></description>
			<content:encoded><![CDATA[<p>As I&#8217;m keen to see more use of LiURL.cn, I do keep an eye on logs to see who&#8217;s linking to us.</p>
<p><a href="http://userscripts.org/users/326">Johan Sundström</a> over at  userscripts.org  has written a php short url services expansion script which includes LiURL.cn.</p>
<p>The script is here:<br />
<a href="http://userscripts.org/scripts/review/46822">http://userscripts.org/scripts/review/46822</a></p>
<p><a href="http://longurl.org">http://longurl.org</a> has also added support for expanding url&#8217;s.  Thanks <a href="http://iamseanmurphy.com/">Sean!</a></p>
<p>Also, a warm thanks/谢谢 to all our users out there also in twitterland.</p>
<p>We also have a twitter id for those that want to follow us for the occasional tweet. &#8211; <a href="http://www.twitter.com/liurl">http://www.twitter.com/liurl<br />
</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.liurl.cn/2009/04/liurlcn-sightings/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SmartShanghai.com now using LiURL</title>
		<link>http://blog.liurl.cn/2009/04/smartshanghaicom-now-using-liurl/</link>
		<comments>http://blog.liurl.cn/2009/04/smartshanghaicom-now-using-liurl/#comments</comments>
		<pubDate>Mon, 20 Apr 2009 23:38:17 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[API]]></category>
		<category><![CDATA[Site Related]]></category>
		<category><![CDATA[franck]]></category>
		<category><![CDATA[integration]]></category>
		<category><![CDATA[smartshanghai]]></category>
		<category><![CDATA[twitter]]></category>

		<guid isPermaLink="false">http://blog.liurl.cn/?p=36</guid>
		<description><![CDATA[SmartShanghai.com is now using LiURL.cn to generate small url&#8217;s for all their twitter links.

Its not immediately obvious, but if you click on the Twitter link (example below), you&#8217;ll see LiURL in use.

We worked with SmartShanghai in order to assist them with integration.  SmartShanghai&#8217;s original plan was to run a script to generate url&#8217;s for [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.SmartShanghai.com">SmartShanghai.com</a> is now using LiURL.cn to generate small url&#8217;s for all their twitter links.</p>
<p><img class="aligncenter size-full wp-image-38" title="Franck Bistro Shanghai - good but expensive French food, in the French Concession" src="http://blog.liurl.cn/wp-content/uploads/2009/04/frank.jpg" alt="frank" width="585" height="431" /></p>
<p>Its not immediately obvious, but if you click on the Twitter link (example below), you&#8217;ll see LiURL in use.</p>
<p><a href="http://twitter.com/home?status=Franck%27s%20Bistro%20http://liurl.cn/ij"><img class="alignnone size-full wp-image-37" title="twitter" src="http://blog.liurl.cn/wp-content/uploads/2009/04/dating_twitter.png" alt="twitter" width="21" height="20" /></a></p>
<p>We worked with SmartShanghai in order to assist them with integration.  SmartShanghai&#8217;s original plan was to run a script to generate url&#8217;s for all 5000+ venues.  While this would have worked, it wasn&#8217;t an optimal solution for either site.</p>
<p>Our revised design works something like this.</p>
<p>On page load, SmartShanghai checks to see if they have a small url for the page in their database.<br />
If they don&#8217;t, they call LiURL&#8217;s API (http://liurl.cn/api-create.php?url=[YOURURL]) to generate a Little URL, and save the URL locally in their database.</p>
<p>Simple, and elegant.  URL&#8217;s are generated only once, on a page request by a user.</p>
<p>If you would like to use LiURL.cn in your site, let us know, and we can assist with integration.</p>
<p>For the technically inclined, sample PHP code to use LiURL.cn is below.</p>
<div class="dean_ch" style="white-space: wrap;">
<span class="kw2">&lt;?php</span></p>
<p><span class="co1">//Use cUrl to retrieve content</span><br />
<span class="kw2">function</span> get_content<span class="br0">&#40;</span><span class="re0">$url</span><span class="br0">&#41;</span> <span class="br0">&#123;</span><br />
<span class="re0">$ch</span> = curl_init<span class="br0">&#40;</span><span class="br0">&#41;</span>;<br />
curl_setopt <span class="br0">&#40;</span><span class="re0">$ch</span>, CURLOPT_URL, <span class="re0">$url</span><span class="br0">&#41;</span>;<br />
curl_setopt <span class="br0">&#40;</span><span class="re0">$ch</span>, CURLOPT_HEADER, <span class="nu0">0</span><span class="br0">&#41;</span>;<br />
<a href="http://www.php.net/ob_start"><span class="kw3">ob_start</span></a><span class="br0">&#40;</span><span class="br0">&#41;</span>;<br />
curl_exec <span class="br0">&#40;</span><span class="re0">$ch</span><span class="br0">&#41;</span>;<br />
curl_close <span class="br0">&#40;</span><span class="re0">$ch</span><span class="br0">&#41;</span>;<br />
<span class="re0">$string</span> = <a href="http://www.php.net/ob_get_contents"><span class="kw3">ob_get_contents</span></a><span class="br0">&#40;</span><span class="br0">&#41;</span>;<br />
<a href="http://www.php.net/ob_end_clean"><span class="kw3">ob_end_clean</span></a><span class="br0">&#40;</span><span class="br0">&#41;</span>;<br />
<span class="kw1">return</span> <span class="re0">$string</span>;<br />
<span class="br0">&#125;</span></p>
<p><span class="co1">//URL = url to encode</span><br />
<span class="re0">$url</span>=<span class="st0">&quot;http://www.example.com&quot;</span>;</p>
<p><span class="co1">//Call the LiURL api</span><br />
<span class="re0">$content</span> = get_content <span class="br0">&#40;</span><span class="st0">&quot;http://liurl.cn/api-create.php?url=&quot;</span>. <span class="re0">$url</span><span class="br0">&#41;</span>;</p>
<p><span class="co1">//Show our short url</span><br />
<a href="http://www.php.net/echo"><span class="kw3">echo</span></a> <span class="re0">$content</span>;</p>
<p><span class="kw2">?&gt;</span><br />
&nbsp;</div>
]]></content:encoded>
			<wfw:commentRss>http://blog.liurl.cn/2009/04/smartshanghaicom-now-using-liurl/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Fast Food Diaries</title>
		<link>http://blog.liurl.cn/2009/04/fast-food-diaries/</link>
		<comments>http://blog.liurl.cn/2009/04/fast-food-diaries/#comments</comments>
		<pubDate>Tue, 14 Apr 2009 14:51:43 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Shopping]]></category>
		<category><![CDATA[Tao Bao]]></category>
		<category><![CDATA[cool hunting]]></category>
		<category><![CDATA[fast food diary]]></category>
		<category><![CDATA[gift ideas]]></category>
		<category><![CDATA[taobao]]></category>

		<guid isPermaLink="false">http://blog.liurl.cn/?p=33</guid>
		<description><![CDATA[Hovering over in the I don&#8217;t need it, but I want one category we have this piece of awesomeness:
Its almost creeping into the &#8220;its so wrong that its right&#8221; category, but I&#8217;ll forgive its rambunctiousness.
Woah, I&#8217;m starting to sound like Woot! here.

Presenting the Fast Food Diary &#8211;  &#8220;盒饭效率手册&#8221;
Available from your local Taobao vendor for [...]]]></description>
			<content:encoded><![CDATA[<p>Hovering over in the I don&#8217;t need it, but I want one category we have this piece of awesomeness:</p>
<p>Its almost creeping into the &#8220;its so wrong that its right&#8221; category, but I&#8217;ll forgive its rambunctiousness.<br />
Woah, I&#8217;m starting to sound like Woot! here.</p>
<p><span id="more-33"></span><br />
Presenting the Fast Food Diary &#8211;  &#8220;盒饭效率手册&#8221;</p>
<p>Available from your local Taobao vendor for +- 80RMB here &#8211; <a href="http://liurl.cn/ek">http://liurl.cn/ek</a></p>
<p><img src="http://blog.liurl.cn/wp-content/uploads/2009/04/45717632200904110122271202268892400_000.jpg" alt="45717632200904110122271202268892400_000" title="45717632200904110122271202268892400_000" width="570" height="8319" class="aligncenter size-full wp-image-34" /></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.liurl.cn/2009/04/fast-food-diaries/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Good birthday gift idea&#8217;s on Taobao</title>
		<link>http://blog.liurl.cn/2009/03/good-birthday-gift-ideas-on-taobao/</link>
		<comments>http://blog.liurl.cn/2009/03/good-birthday-gift-ideas-on-taobao/#comments</comments>
		<pubDate>Wed, 04 Mar 2009 03:47:35 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Shopping]]></category>
		<category><![CDATA[Tao Bao]]></category>

		<guid isPermaLink="false">http://blog.liurl.cn/?p=21</guid>
		<description><![CDATA[Birthday gift idea's on Taobao - Framed Newspapers from when you were born.]]></description>
			<content:encoded><![CDATA[<p>Some of the fun uses of LiURL are for linking sites with enormously long URL&#8217;s &#8211; TaoBao, yes I&#8217;m looking at you there.</p>
<p>Here are a couple of things I found this morning that I linked to with our URL Shortening tool that make great birthday gifts.</p>
<p>I&#8217;ve always liked the idea of giving someone something that shows a little thought in the present.  So, I present to you &#8211; newspapers from whenever; when framed they make great gifts.</p>
<p>Only problem is finding out exactly how old someone is in order to order, not everyone wants to tell their true age!</p>
<p>一大使用LiURL的乐趣是从网站上连接一些特别长的链接-淘宝，是的，我正从那浏览呢。</p>
<p>这里是一些我早上发现的，通过我们链接缩短工具连接的，可以作为美妙的生日礼物的东东。</p>
<p>我一直喜欢赠送给朋友们一些可以引人思考的礼物。所以我在此介绍给你-各式的重新装裱后的旧报纸，它们是作为生日礼物的绝佳选择。</p>
<p>唯一的问题是找出想要订购他们的人的年龄，因为并不是每个人都乐于透露自己的真实年纪呢！</p>
<p><a href="http://liurl.cn/75">http://liurl.cn/75</a></p>
<p><img class="alignnone size-full wp-image-23" title="birthday-paper2" src="http://blog.liurl.cn/wp-content/uploads/2009/03/birthday-paper2.jpg" alt="birthday-paper2" width="220" height="176" /> <img class="alignnone size-full wp-image-22" title="birthday-paper" src="http://blog.liurl.cn/wp-content/uploads/2009/03/birthday-paper.jpg" alt="birthday-paper" width="220" height="176" /></p>
<p><a href="http://liurl.cn/76">http://liurl.cn/76</a></p>
<p>Lots of newspaper choices -</p>
<p>丰富种类的报刊选择-</p>
<p>新华日报 (Xin Hua)<br />
南方日报 (Southern)<br />
etc</p>
<p>The image below shows how cool something can look framed.</p>
<p>以下的图片展示了美妙的装裱后的报刊。</p>
<p><img class="alignnone size-full wp-image-24" title="newspapers" src="http://blog.liurl.cn/wp-content/uploads/2009/03/newspapers.jpg" alt="newspapers" width="553" height="547" /></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.liurl.cn/2009/03/good-birthday-gift-ideas-on-taobao/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>API Stuff /  短连接API</title>
		<link>http://blog.liurl.cn/2009/03/api-stuff/</link>
		<comments>http://blog.liurl.cn/2009/03/api-stuff/#comments</comments>
		<pubDate>Sun, 01 Mar 2009 15:08:40 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[API]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[script]]></category>
		<category><![CDATA[短连接]]></category>

		<guid isPermaLink="false">http://blog.liurl.cn/?p=10</guid>
		<description><![CDATA[Quick API howto with code example]]></description>
			<content:encoded><![CDATA[<p>We actually have an API for the LiURL site, although I haven&#8217;t really documented it that well as of yet.  As we&#8217;re a brand new site, we&#8217;re busy building in functionality, so this will get expanded in further posts as we add features.</p>
<p>To get a Shortened URL (aka Little URL) , the call is this:</p>
<p><strong>http://liurl.cn/api-create.php?url=</strong></p>
<p>Which returns the short URL. If you&#8217;ve been naughty and haven&#8217;t passed a valid URL, then it will return you a big fat -1 for your efforts.</p>
<p>Strangely enough, we also have the diametrically opposite call of that, which (suprise suprise)  gives you a long URL from a shortened one</p>
<p><strong>http://liurl.cn/api-create.php?tinyurl=</strong></p>
<p>This also returns a -1 failure if the URL isn&#8217;t one we know about.</p>
<p>Some sample PHP code after the break</p>
<p>虽然我目前仍未正式书面记录，不过在LiURL网站 我们已经使用了API。由于我们是新建的品牌网站，目前我们正忙于建设网站的功能性。所以这部分我们将在以后增加网站新特性时候加以扩充。</p>
<p>如果需要缩短后的链接 如下所示</p>
<p>http://liurl.cn/api-create.php?url=</p>
<p>它将返回缩短后的链接。如果您没有通过正规的链接那么将会出现大大的 -1错误提示。</p>
<p>奇怪的是，我们也遇到了完全相反的情况，有时它会从短链接提供一个长链接（非常奇怪）。</p>
<p>http://liurl.cn/api-create.php?tinyurl=</p>
<p>如果链接不正确 它同样也会出现 -1 错误提示。</p>
<p>以下是一些错误后的PHP编码样本。</p>
<p><span id="more-10"></span></p>
<p>Example PHP Code:</p>
<div class="dean_ch" style="white-space: wrap;"><span class="kw2">&lt;?php</span></p>
<p><span class="kw2">function</span> process<span class="br0">&#40;</span><span class="re0">$url</span>,<span class="re0">$postargs</span>=<span class="kw2">false</span><span class="br0">&#41;</span> <span class="br0">&#123;</span><br />
&nbsp; &nbsp; <span class="re0">$username</span>=<span class="st0">&#8221;</span>; <span class="re0">$password</span>=<span class="st0">&#8221;</span>;<br />
&nbsp; &nbsp; <span class="re0">$ch</span> = curl_init<span class="br0">&#40;</span><span class="re0">$url</span><span class="br0">&#41;</span>;<br />
&nbsp; &nbsp; <span class="kw1">if</span><span class="br0">&#40;</span><span class="re0">$postargs</span> !== <span class="kw2">false</span><span class="br0">&#41;</span>&nbsp;<span class="br0">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; curl_setopt <span class="br0">&#40;</span><span class="re0">$ch</span>, CURLOPT_POST, <span class="kw2">true</span><span class="br0">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; curl_setopt <span class="br0">&#40;</span><span class="re0">$ch</span>, CURLOPT_POSTFIELDS, <span class="re0">$postargs</span><span class="br0">&#41;</span>;<br />
&nbsp; &nbsp; <span class="br0">&#125;</span></p>
<p>&nbsp; &nbsp; <span class="kw1">if</span><span class="br0">&#40;</span>username !== <span class="kw2">false</span> &amp;amp;&amp;amp; password !== <span class="kw2">false</span><span class="br0">&#41;</span><br />
&nbsp; &nbsp; curl_setopt<span class="br0">&#40;</span><span class="re0">$ch</span>, CURLOPT_USERPWD, username.‘:’.password<span class="br0">&#41;</span>;<br />
&nbsp; &nbsp; <br />
&nbsp; &nbsp; curl_setopt<span class="br0">&#40;</span><span class="re0">$ch</span>, CURLOPT_VERBOSE, <span class="nu0">1</span><span class="br0">&#41;</span>;<br />
&nbsp; &nbsp; curl_setopt<span class="br0">&#40;</span><span class="re0">$ch</span>, CURLOPT_NOBODY, <span class="nu0">0</span><span class="br0">&#41;</span>;<br />
&nbsp; &nbsp; curl_setopt<span class="br0">&#40;</span><span class="re0">$ch</span>, CURLOPT_HEADER, <span class="nu0">0</span><span class="br0">&#41;</span>;<br />
&nbsp; &nbsp; curl_setopt<span class="br0">&#40;</span><span class="re0">$ch</span>, CURLOPT_FOLLOWLOCATION,<span class="nu0">1</span><span class="br0">&#41;</span>;<br />
&nbsp; &nbsp; curl_setopt<span class="br0">&#40;</span><span class="re0">$ch</span>, CURLOPT_RETURNTRANSFER, <span class="nu0">1</span><span class="br0">&#41;</span>;<br />
&nbsp; &nbsp; <br />
&nbsp; &nbsp; <span class="re0">$response</span> = curl_exec<span class="br0">&#40;</span><span class="re0">$ch</span><span class="br0">&#41;</span>;<br />
&nbsp; &nbsp; <br />
&nbsp; &nbsp; <span class="re0">$responseInfo</span>=curl_getinfo<span class="br0">&#40;</span><span class="re0">$ch</span><span class="br0">&#41;</span>;<br />
&nbsp; &nbsp; curl_close<span class="br0">&#40;</span><span class="re0">$ch</span><span class="br0">&#41;</span>;<br />
&nbsp; &nbsp; <br />
&nbsp; &nbsp; <span class="kw1">if</span><span class="br0">&#40;</span> <a href="http://www.php.net/intval"><span class="kw3">intval</span></a><span class="br0">&#40;</span> <span class="re0">$responseInfo</span><span class="br0">&#91;</span>‘http_code’<span class="br0">&#93;</span> <span class="br0">&#41;</span> == <span class="nu0">200</span> <span class="br0">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">return</span> <span class="re0">$response</span>;<br />
&nbsp; &nbsp; <span class="kw1">else</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">return</span> <span class="kw2">false</span>;<br />
<span class="br0">&#125;</span></p>
<p><span class="kw2">function</span> shorturl<span class="br0">&#40;</span> <span class="re0">$url</span> <span class="br0">&#41;</span> <span class="br0">&#123;</span><br />
&nbsp; &nbsp; <span class="re0">$request</span> = <span class="st0">&#8216;http://liurl.cn/api-create.php?url=&#8217;</span> . <span class="re0">$url</span>;<br />
&nbsp; &nbsp; process<span class="br0">&#40;</span> <span class="re0">$request</span> <span class="br0">&#41;</span>;<br />
<span class="br0">&#125;</span></p>
<p><span class="kw2">function</span> longurl <span class="br0">&#40;</span><span class="re0">$url</span><span class="br0">&#41;</span> <span class="br0">&#123;</span><br />
&nbsp; &nbsp; <span class="re0">$request</span> = <span class="st0">&#8216;http://liurl.cn/api-create.php?tinyurl=&#8217;</span>.<span class="re0">$url</span>;<br />
&nbsp; &nbsp; process<span class="br0">&#40;</span> <span class="re0">$request</span> <span class="br0">&#41;</span>;<br />
<span class="br0">&#125;</span></p>
<p><span class="re0">$shorty</span> = shorturl <span class="br0">&#40;</span><span class="st0">&#8216;http://www.liurl.cn&#8217;</span><span class="br0">&#41;</span>;</p>
<p><a href="http://www.php.net/print"><span class="kw3">print</span></a> <span class="st0">&quot;Show me the money: &quot;</span> . <span class="re0">$shorty</span> ;</p>
<p><span class="re0">$longy</span> = longurl <span class="br0">&#40;</span><span class="re0">$shorty</span><span class="br0">&#41;</span>;</p>
<p><a href="http://www.php.net/print"><span class="kw3">print</span></a> <span class="st0">&quot;Guess what this url is: &quot;</span>. <span class="re0">$shorty</span>. <span class="st0">&quot; = &quot;</span> . <span class="re0">$longy</span>;</p>
<p><span class="kw2">?&gt;</span> <br />
&nbsp;</div>
]]></content:encoded>
			<wfw:commentRss>http://blog.liurl.cn/2009/03/api-stuff/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Site usage Statistics</title>
		<link>http://blog.liurl.cn/2009/03/site-usage-statistics/</link>
		<comments>http://blog.liurl.cn/2009/03/site-usage-statistics/#comments</comments>
		<pubDate>Sun, 01 Mar 2009 10:14:31 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Site Related]]></category>
		<category><![CDATA[Stats]]></category>

		<guid isPermaLink="false">http://blog.liurl.cn/?p=5</guid>
		<description><![CDATA[As we&#8217;ve had Google analytics running on the LiURL site since its launch, its been interesting for me to see where the site is actually being used.
So far usage has spread to a bunch of cities I&#8217;ve never even heard of in China, as well as the usual culprits (Shanghai, Beijing).  Lets hope that we [...]]]></description>
			<content:encoded><![CDATA[<p>As we&#8217;ve had Google analytics running on the LiURL site since its launch, its been interesting for me to see where the site is actually being used.<br />
So far usage has spread to a bunch of cities I&#8217;ve never even heard of in China, as well as the usual culprits (Shanghai, Beijing).  Lets hope that we can spread to more cities next month, and cover the map!</p>
<p>Interestingly enough, zero hits from outside China so far.</p>
<p>网站使用统计</p>
<p>在LiURL网站开启的时候 我们就启用了谷歌分析系统。观察网站在被如何使用对我来说是十分有趣的。<br />
目前为止，网站被大量的中国城市使用，如文化中心（上海，北京）甚至更有些我从未听说过的中国城市。希望我们在下个月能将网站推广到更多的城市中去，覆盖整个地图！</p>
<p>非常有趣的是，目前没有中国以外的使用记录。</p>
<div id="attachment_7" class="wp-caption alignnone" style="width: 568px"><img class="size-full wp-image-7" title="usage-map" src="http://blog.liurl.cn/wp-content/uploads/2009/03/usage-map.jpg" alt="City Usage Map" width="558" height="416" /><p class="wp-caption-text">City Usage Map</p></div>
<div id="attachment_6" class="wp-caption alignleft" style="width: 203px"><img class="size-full wp-image-6" title="usage-cities" src="http://blog.liurl.cn/wp-content/uploads/2009/03/usage-cities.jpg" alt="Chinese City's LiURL is being used from!" width="193" height="238" /><p class="wp-caption-text">Chinese City&#39;s LiURL is being used from!</p></div>
]]></content:encoded>
			<wfw:commentRss>http://blog.liurl.cn/2009/03/site-usage-statistics/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Welcome</title>
		<link>http://blog.liurl.cn/2009/02/welcome/</link>
		<comments>http://blog.liurl.cn/2009/02/welcome/#comments</comments>
		<pubDate>Sat, 28 Feb 2009 09:44:44 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://blog.liurl.cn/?p=3</guid>
		<description><![CDATA[Welcome to the Li(ttle)URL.cn blog.
We&#8217;re just setting things up, but will be posting cool sites us and our users have found, as well as updates on whats happening at LiURL.cn
Stay tuned!
欢迎来到 LiURL.CN 博客
我们刚刚架设完博客，不过我们将会放上我们和我们用户们找到的优秀网站，同时也会保持更新LiURL.cn上发生的日常事务。
请保持关注！
]]></description>
			<content:encoded><![CDATA[<p>Welcome to the Li(ttle)URL.cn blog.</p>
<p>We&#8217;re just setting things up, but will be posting cool sites us and our users have found, as well as updates on whats happening at LiURL.cn<br />
Stay tuned!</p>
<p>欢迎来到 LiURL.CN 博客</p>
<p>我们刚刚架设完博客，不过我们将会放上我们和我们用户们找到的优秀网站，同时也会保持更新LiURL.cn上发生的日常事务。<br />
请保持关注！</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.liurl.cn/2009/02/welcome/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
