<?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>Davy&#039;s Blog</title>
	<atom:link href="http://blog.hao909.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.hao909.com</link>
	<description>Nothing is impossible­ for a willing heart.</description>
	<lastBuildDate>Tue, 31 Jan 2012 16:30:13 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.5</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>PHP Operator ===</title>
		<link>http://blog.hao909.com/php-operator/</link>
		<comments>http://blog.hao909.com/php-operator/#comments</comments>
		<pubDate>Tue, 31 Jan 2012 16:30:13 +0000</pubDate>
		<dc:creator>greenhawk</dc:creator>
				<category><![CDATA[PHP Learn]]></category>
		<category><![CDATA[operator]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://blog.hao909.com/?p=742</guid>
		<description><![CDATA[PHP’s === Operator enables you to compare or test variables for both equality and type. Refer below for example.

&#60;?php
//define variables..
$str = '9';
$int = 9;

//Returns true since both variable contains the same value..
$res = ($str==$int);

//Returns false since the two variables are not of the same type..
$res = ($str===$int);
?&#62;

]]></description>
		<wfw:commentRss>http://blog.hao909.com/php-operator/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Create a REST API with PHP</title>
		<link>http://blog.hao909.com/create-a-rest-api-with-php/</link>
		<comments>http://blog.hao909.com/create-a-rest-api-with-php/#comments</comments>
		<pubDate>Sat, 28 Jan 2012 17:17:25 +0000</pubDate>
		<dc:creator>greenhawk</dc:creator>
				<category><![CDATA[PHP Learn]]></category>
		<category><![CDATA[api]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[REST]]></category>

		<guid isPermaLink="false">http://blog.hao909.com/?p=740</guid>
		<description><![CDATA[One of the latest (sort of) crazes sweeping the net is APIs, more  specifically those that leverage REST.  It’s really no surprise either,  as consuming REST APIs is so incredibly easy… in any language.  It’s  also incredibly easy to create them as you essentially use nothing more  than an [...]]]></description>
		<wfw:commentRss>http://blog.hao909.com/create-a-rest-api-with-php/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Create web server on Mac</title>
		<link>http://blog.hao909.com/create-web-server-mac/</link>
		<comments>http://blog.hao909.com/create-web-server-mac/#comments</comments>
		<pubDate>Fri, 14 Oct 2011 01:39:03 +0000</pubDate>
		<dc:creator>greenhawk</dc:creator>
				<category><![CDATA[Miscellaneous]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[mac]]></category>
		<category><![CDATA[Mysql]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://blog.hao909.com/?p=738</guid>
		<description><![CDATA[Apache
Start Apache
 sudo apachectl start 
Check it&#8217;s working: http://localhost/
PHP
In /etc/apache2/httpd.conf, uncomment this line:

LoadModule php5_module        libexec/apache2/libphp5.so

Restart Apache
 sudo apachectl restart 
Fix a warning appearing in phpinfo()
Create /etc/php.ini and make it writable

cd /etc
sudo cp php.ini.default php.ini
sudo chmod 666 php.ini

In php.ini, find this line:
 ;date.timezone = 
Uncomment it and insert your [...]]]></description>
		<wfw:commentRss>http://blog.hao909.com/create-web-server-mac/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>ExtJS4 Viewport Example</title>
		<link>http://blog.hao909.com/extjs4-viewport-example/</link>
		<comments>http://blog.hao909.com/extjs4-viewport-example/#comments</comments>
		<pubDate>Fri, 30 Sep 2011 00:48:24 +0000</pubDate>
		<dc:creator>greenhawk</dc:creator>
				<category><![CDATA[ExtJS]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[extjs]]></category>
		<category><![CDATA[viewport]]></category>

		<guid isPermaLink="false">http://blog.hao909.com/?p=735</guid>
		<description><![CDATA[This is an simple example to show you how to create a viewport in ExtJs4.
The Viewport renders itself to the document body, and automatically sizes itself to the size of the browser viewport and manages window resizing. There may only be one Viewport created in a page.
The Viewport does not provide scrolling, so child Panels [...]]]></description>
		<wfw:commentRss>http://blog.hao909.com/extjs4-viewport-example/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>ExtJS4 : read posting JSON data in PHP</title>
		<link>http://blog.hao909.com/extjs4-read-posting-json-data-in-php/</link>
		<comments>http://blog.hao909.com/extjs4-read-posting-json-data-in-php/#comments</comments>
		<pubDate>Thu, 29 Sep 2011 16:50:30 +0000</pubDate>
		<dc:creator>greenhawk</dc:creator>
				<category><![CDATA[ExtJS]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[extjs]]></category>
		<category><![CDATA[json]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://blog.hao909.com/?p=722</guid>
		<description><![CDATA[I am working on a Ext-JS web application which needs to send data to the PHP server side to store. It took me a while to find out how to decodes the receiving JSON string in PHP.
Ext-JS 
Assume you have a model and calling save to send a ajax request. 

Ext.define('User', {
    [...]]]></description>
		<wfw:commentRss>http://blog.hao909.com/extjs4-read-posting-json-data-in-php/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>ExtJS4: Add Custom Right Click Menu in MVC</title>
		<link>http://blog.hao909.com/extjs4-add-custom-right-click-menu-in-mvc/</link>
		<comments>http://blog.hao909.com/extjs4-add-custom-right-click-menu-in-mvc/#comments</comments>
		<pubDate>Tue, 27 Sep 2011 00:39:59 +0000</pubDate>
		<dc:creator>greenhawk</dc:creator>
				<category><![CDATA[ExtJS]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[alias]]></category>
		<category><![CDATA[extjs]]></category>
		<category><![CDATA[MVC]]></category>

		<guid isPermaLink="false">http://blog.hao909.com/?p=715</guid>
		<description><![CDATA[The way to create a custom menu in mouse right click event function in ExtJS 4 is little different with pre-version. It seems in Ext 4.0.2 they changed event name and arguments order. 
First, let&#8217;s see how we create the menu in Ext 3. I get this example from aditia rahman:

var menu1 = new Ext.menu.Menu({
 [...]]]></description>
		<wfw:commentRss>http://blog.hao909.com/extjs4-add-custom-right-click-menu-in-mvc/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>ThinkPHP中实现gzip压缩</title>
		<link>http://blog.hao909.com/thinkphp%e4%b8%ad%e5%ae%9e%e7%8e%b0gzip%e5%8e%8b%e7%bc%a9/</link>
		<comments>http://blog.hao909.com/thinkphp%e4%b8%ad%e5%ae%9e%e7%8e%b0gzip%e5%8e%8b%e7%bc%a9/#comments</comments>
		<pubDate>Sun, 25 Sep 2011 00:59:12 +0000</pubDate>
		<dc:creator>greenhawk</dc:creator>
				<category><![CDATA[thinkphp]]></category>
		<category><![CDATA[gzip]]></category>

		<guid isPermaLink="false">http://blog.hao909.com/?p=713</guid>
		<description><![CDATA[ThinkPHP中似乎没有对gzip的配置选项。不过实现起来还是挺简单的。以下是对 ThinkPHP 2.1 的修改方法。
首先要确定空间是否支持Zlib, 然后找ThinkPHP的控制输出函数output()。
控制输出的文件在 ThinkPHP/Lib/Think/Core 文件夹下，文件名 View.class.php。

     /**
     +----------------------------------------------------------
     * 输出模板
     +----------------------------------------------------------
     * @access protected
     +----------------------------------------------------------
     * @param string $content 模板内容
     * [...]]]></description>
		<wfw:commentRss>http://blog.hao909.com/thinkphp%e4%b8%ad%e5%ae%9e%e7%8e%b0gzip%e5%8e%8b%e7%bc%a9/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Using Global variables and arrays in Extjs 4</title>
		<link>http://blog.hao909.com/using-global-variables-and-arrays-in-extjs-4/</link>
		<comments>http://blog.hao909.com/using-global-variables-and-arrays-in-extjs-4/#comments</comments>
		<pubDate>Tue, 20 Sep 2011 15:32:58 +0000</pubDate>
		<dc:creator>greenhawk</dc:creator>
				<category><![CDATA[ExtJS]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[extjs]]></category>
		<category><![CDATA[MVC]]></category>

		<guid isPermaLink="false">http://blog.hao909.com/?p=708</guid>
		<description><![CDATA[This example will show you how to declare a global var and arrays in Extjs MVC application.
You know where to find this code : 

&#60;script type=&#34;text/javascript&#34;&#62;
        Ext.BLANK_IMAGE_URL = '/Content/images/default/s.gif';
&#60;/script&#62;

Global application variable : 

&#60;script type=&#34;text/javascript&#34;&#62;
        Ext.BLANK_IMAGE_URL = '/Content/images/default/s.gif';
     [...]]]></description>
		<wfw:commentRss>http://blog.hao909.com/using-global-variables-and-arrays-in-extjs-4/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>PHP断点续传 HTTP学习笔记</title>
		<link>http://blog.hao909.com/php%e6%96%ad%e7%82%b9%e7%bb%ad%e4%bc%a0-http%e5%ad%a6%e4%b9%a0%e7%ac%94%e8%ae%b0/</link>
		<comments>http://blog.hao909.com/php%e6%96%ad%e7%82%b9%e7%bb%ad%e4%bc%a0-http%e5%ad%a6%e4%b9%a0%e7%ac%94%e8%ae%b0/#comments</comments>
		<pubDate>Fri, 09 Sep 2011 01:47:21 +0000</pubDate>
		<dc:creator>greenhawk</dc:creator>
				<category><![CDATA[PHP Learn]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[断点续传]]></category>

		<guid isPermaLink="false">http://blog.hao909.com/?p=704</guid>
		<description><![CDATA[HTTP断点续传原理是这样的： 
1. 客户端需要告诉服务器端从哪里开始。
2.服务端收到请求,返回206状态。并标识续传的起始点及结束点
如下实例
1. 客户端传递请求信息给web服务器，要求从200070字节开始。。
GET /down.zip  HTTP/1.1
User-Agent：NetFox
RANGE: bytes = 200070-
Accept：text/html，image/gif，image/jpeg，*；q=.2，*/*；q=.2
2.服务端收到这个请求以后，返回信息
206
Content-Length = 100222222
Content-Range = bytes 200070 &#8211; 100222221/100222222
Content-Type=application/octet-stream
注意：服务端状态 206； Content-Range = bytes （客户端请求续传起始点） &#8211; （下载文件大小-1）/（下载文件大小）
在PHP中，是利用$_SERVER['HTTP-RANGE']来取得客户端请求的续传起始点。所以其实现代码如下:

&#60;?php
/**
 *  PHP-HTTP断点续传实现
 *  @param string $path: 文件所在路径
 *  @param string $file: 文件名
 *  @return void
 */

function download($path,$file) {

    $real = $path.'/'.$file;

    [...]]]></description>
		<wfw:commentRss>http://blog.hao909.com/php%e6%96%ad%e7%82%b9%e7%bb%ad%e4%bc%a0-http%e5%ad%a6%e4%b9%a0%e7%ac%94%e8%ae%b0/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Using CURL follow redirects to get final url</title>
		<link>http://blog.hao909.com/using-curl-follow-redirects-to-get-final-url/</link>
		<comments>http://blog.hao909.com/using-curl-follow-redirects-to-get-final-url/#comments</comments>
		<pubDate>Sun, 28 Aug 2011 17:59:24 +0000</pubDate>
		<dc:creator>greenhawk</dc:creator>
				<category><![CDATA[PHP Script]]></category>
		<category><![CDATA[curl]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[redirect]]></category>

		<guid isPermaLink="false">http://blog.hao909.com/?p=702</guid>
		<description><![CDATA[This example code shows you how to use curl to follow redirects and get final url. 

&#60;?php
function get_final_url( $url, $timeout = 5 )
{
    $url = str_replace( &#34;&#38;amp;&#34;, &#34;&#38;&#34;, urldecode(trim($url)) );

    $cookie = tempnam (&#34;/tmp&#34;, &#34;CURLCOOKIE&#34;);
    $ch = curl_init();
    curl_setopt( $ch, CURLOPT_USERAGENT, &#34;Mozilla/5.0 (Windows; [...]]]></description>
		<wfw:commentRss>http://blog.hao909.com/using-curl-follow-redirects-to-get-final-url/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

