<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-419615248077968639</id><updated>2012-02-17T09:17:06.020+08:00</updated><title type='text'>阿辉博客</title><subtitle type='html'>&amp;lt;?php</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://www.zivee.cn/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/419615248077968639/posts/default'/><link rel='alternate' type='text/html' href='http://www.zivee.cn/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>志辉徐</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-8FUeQo9fnqc/AAAAAAAAAAI/AAAAAAAAA3A/Nv8pbvvYVzU/s512-c/photo.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>4</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-419615248077968639.post-465416057384969893</id><published>2012-02-06T00:10:00.001+08:00</published><updated>2012-02-06T01:28:25.017+08:00</updated><title type='text'>[备用]利用Curl|socket|file_get_contents POST数据</title><content type='html'>&lt;script type="syntaxhighlighter" class="brush: php"&gt;&lt;![CDATA[&lt;?php/*** Socket版本* 使用方法：* $post_string = "app=socket&amp;version=beta";* request_by_socket('facebook.cn','/restServer.php',$post_string);*/function request_by_socket($remote_server,$remote_path,$post_string,$port = 80,$timeout = 30){    $socket = fsockopen($remote_server,$port,$errno,$errstr,$timeout);    if (!$socket) die("$errstr($errno)");     fwrite($socket,"POST $remote_path HTTP/1.0\r\n");    //fwrite($socket,"User-Agent: Socket Example\r\n");    fwrite($socket,"User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; zh-CN; rv:1.9.1.2) Gecko/20090729 Firefox/3.5.2\r\n");    fwrite($socket,"HOST: $remote_server\r\n");    fwrite($socket,"Content-type: application/x-www-form-urlencoded\r\n");    fwrite($socket,"Content-length: ".strlen($post_string) ."\r\n");    fwrite($socket,"Accept:*/*\r\n");    fwrite($socket,"\r\n");    fwrite($socket,$post_string."\r\n");    fwrite($socket,"\r\n");     $header = "";//去除头部    while ($str = trim(fgets($socket,4096))) {        $header.=$str;    }     $data = "";    while (!feof($socket)) {        $data .= fgets($socket,4096);    }     return $data;}  /*** Curl版本* 使用方法：* $post_string = "app=request&amp;version=beta";* request_by_curl('http://facebook.cn/restServer.php',$post_string);*/function request_by_curl($remote_server,$post_string){    $ch = curl_init();    curl_setopt($ch,CURLOPT_URL,$remote_server);    curl_setopt($ch,CURLOPT_POSTFIELDS,$post_string);    curl_setopt($ch,CURLOPT_RETURNTRANSFER,true);    curl_setopt($ch,CURLOPT_USERAGENT,'Mozilla/5.0 (Windows; U; Windows NT 5.1; zh-CN; rv:1.9.1.2) Gecko/20090729 Firefox/3.5.2');    $data = curl_exec($ch);    curl_close($ch);    return $data;}/*** 其它版本* 使用方法：* $post_string = "app=request&amp;version=beta";* request_by_other('http://facebook.cn/restServer.php',$post_string);*/function request_by_other($remote_server,$post_string){    $context = array(        'http'=&gt;array(            'method'=&gt;'POST',            'header'=&gt;'Content-type: application/x-www-form-urlencoded'."\r\n".                      'User-Agent : Mozilla/5.0 (Windows; U; Windows NT 5.1; zh-CN; rv:1.9.1.2) Gecko/20090729 Firefox/3.5.2'."\r\n".                      'Content-length: '.strlen($post_string),            'content'=&gt;$post_string)        );    $stream_context = stream_context_create($context);    $data = file_get_contents($remote_server,FALSE,$stream_context);    return $data;} ]]&gt;&lt;/script&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/419615248077968639-465416057384969893?l=www.zivee.cn' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.zivee.cn/feeds/465416057384969893/comments/default' title='帖子评论'/><link rel='replies' type='text/html' href='http://www.zivee.cn/2012/02/curlsocketfilegetcontents-post.html#comment-form' title='0 条评论'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/419615248077968639/posts/default/465416057384969893'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/419615248077968639/posts/default/465416057384969893'/><link rel='alternate' type='text/html' href='http://www.zivee.cn/2012/02/curlsocketfilegetcontents-post.html' title='[备用]利用Curl|socket|file_get_contents POST数据'/><author><name>志辉徐</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-8FUeQo9fnqc/AAAAAAAAAAI/AAAAAAAAA3A/Nv8pbvvYVzU/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-419615248077968639.post-5109403672682602602</id><published>2012-02-05T23:36:00.001+08:00</published><updated>2012-02-05T23:43:11.755+08:00</updated><title type='text'>申请了一个免费域名 zivee.tk</title><content type='html'>&lt;a href="http://www.zivee.tk"&gt;&lt;strong&gt;Zivee.TK&lt;/strong&gt;&lt;/a&gt;将主要用于个人学习实验只用，其限制还是有的，域名每90天要有25次访问。对于一个顶级域名还有什么更高的要求吗!其本身还有自定义dns服务器。现在就用其搭建一个自己完成的GAE 应用，用于发送天气预报信息 &lt;a href="http://g.zivee.tk"&gt;&lt;em&gt;g.zivee.tk&lt;/em&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/419615248077968639-5109403672682602602?l=www.zivee.cn' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.zivee.cn/feeds/5109403672682602602/comments/default' title='帖子评论'/><link rel='replies' type='text/html' href='http://www.zivee.cn/2012/02/ziveetk.html#comment-form' title='0 条评论'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/419615248077968639/posts/default/5109403672682602602'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/419615248077968639/posts/default/5109403672682602602'/><link rel='alternate' type='text/html' href='http://www.zivee.cn/2012/02/ziveetk.html' title='申请了一个免费域名 zivee.tk'/><author><name>志辉徐</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-8FUeQo9fnqc/AAAAAAAAAAI/AAAAAAAAA3A/Nv8pbvvYVzU/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-419615248077968639.post-3578626232272267904</id><published>2012-02-02T23:27:00.001+08:00</published><updated>2012-02-02T23:55:36.450+08:00</updated><title type='text'>list()和array_merge()对数组的处理注意事项</title><content type='html'>&lt;p&gt;使用list对数组操作无法进行赋值操作。官方解释是：list() 仅能用于数字索引的数组并假定数字索引从 0 开始。 因此这里对关联数组是无效的，而且在赋值顺序上是从list的右边开始赋值。&lt;/p&gt;&lt;h2&gt;void list ( mixed varname, mixed … )&lt;/h2&gt;&lt;p&gt;&lt;strong&gt;说明&lt;/strong&gt;&lt;br /&gt;像 array() 一样，这不是真正的函数，而是语言结构。list() 用一步操作给一组变量进行赋值。同时对数组进行合并时使用了array_merge但最终发现新生成数组的被重新索引。如果保留原有数组索引不变并只想新的数组附加到后面，可以适时用 + 运算符合并数组。&lt;/p&gt;&lt;h2&gt;array array_merge ( array array1 [, array array2 [, array ...]] )&lt;/h2&gt;&lt;p&gt;&lt;strong&gt;说明&lt;/strong&gt;&lt;br /&gt;array_merge() 将一个或多个数组的单元合并起来，一个数组中的值附加在前一个数组的后面。返回作为结果的数组。如果输入的数组中有相同的字符串键名，则该键名后面的值将覆盖前一个值。然而，如果数组包含数字键名，后面的值将不会覆盖原来的值，而是附加到后面。如果只给了一个数组并且该数组是数字索引的，则键名会以连续方式重新索引。&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/419615248077968639-3578626232272267904?l=www.zivee.cn' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.zivee.cn/feeds/3578626232272267904/comments/default' title='帖子评论'/><link rel='replies' type='text/html' href='http://www.zivee.cn/2012/02/test-i.html#comment-form' title='0 条评论'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/419615248077968639/posts/default/3578626232272267904'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/419615248077968639/posts/default/3578626232272267904'/><link rel='alternate' type='text/html' href='http://www.zivee.cn/2012/02/test-i.html' title='list()和array_merge()对数组的处理注意事项'/><author><name>志辉徐</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-8FUeQo9fnqc/AAAAAAAAAAI/AAAAAAAAA3A/Nv8pbvvYVzU/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-419615248077968639.post-918586372710233640</id><published>2011-12-21T19:41:00.001+08:00</published><updated>2011-12-21T19:41:47.614+08:00</updated><title type='text'>博客重开了</title><content type='html'>把博客搬入了&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/419615248077968639-918586372710233640?l=www.zivee.cn' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.zivee.cn/feeds/918586372710233640/comments/default' title='帖子评论'/><link rel='replies' type='text/html' href='http://www.zivee.cn/2011/12/blog-post.html#comment-form' title='0 条评论'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/419615248077968639/posts/default/918586372710233640'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/419615248077968639/posts/default/918586372710233640'/><link rel='alternate' type='text/html' href='http://www.zivee.cn/2011/12/blog-post.html' title='博客重开了'/><author><name>志辉徐</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-8FUeQo9fnqc/AAAAAAAAAAI/AAAAAAAAA3A/Nv8pbvvYVzU/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry></feed>
