<?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>52微笑Blog &#187; 微信</title>
	<atom:link href="https://www.52smile.cn/?feed=rss2&#038;tag=%E5%BE%AE%E4%BF%A1" rel="self" type="application/rss+xml" />
	<link>https://www.52smile.cn</link>
	<description>记录生活点滴，分享精彩缤纷！</description>
	<lastBuildDate>Mon, 15 Jun 2015 13:33:12 +0000</lastBuildDate>
	<language>zh-CN</language>
		<sy:updatePeriod>hourly</sy:updatePeriod>
		<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.9.1</generator>
	<item>
		<title>微信开发手记之·网页授权</title>
		<link>https://www.52smile.cn/?p=1555</link>
		<comments>https://www.52smile.cn/?p=1555#comments</comments>
		<pubDate>Fri, 05 Dec 2014 07:10:17 +0000</pubDate>
		<dc:creator><![CDATA[子涛]]></dc:creator>
				<category><![CDATA[学习笔记]]></category>
		<category><![CDATA[微信]]></category>
		<category><![CDATA[微信授权]]></category>

		<guid isPermaLink="false">http://www.52smile.cn/?p=1555</guid>
		<description><![CDATA[<a href="https://www.52smile.cn/?p=1555"><img width="700" height="214" src="http://www.52smile.cn/wp-content/uploads/2014/12/wechat-development20141205.jpg" class="attachment-post-thumbnail wp-post-image" alt="wechat-development20141205" itemprop="image" lazyload="1" /></a>因为微信公众号的兴起和极强的扩散能力，公司的大部分客户也已经慢慢把这方面的业务作为了合作的必要需求，作为公司在移动端的推广和信息推送的重要手段微信的开发显得尤为重要，便捷性、时效性、好的用户体验可以让用户尽可能的记住你从而对公众号或公司做到较大程度的宣传和推广。依托于腾讯的强大平台和数亿万级的用户群体把微信称作移动端所]]></description>
				<content:encoded><![CDATA[<a href="https://www.52smile.cn/?p=1555"><img width="700" height="214" src="http://www.52smile.cn/wp-content/uploads/2014/12/wechat-development20141205.jpg" class="attachment-post-thumbnail wp-post-image" alt="wechat-development20141205" itemprop="image" lazyload="1" /></a><p>因为微信公众号的兴起和极强的扩散能力，公司的大部分客户也已经慢慢把这方面的业务作为了合作的必要需求，作为公司在移动端的推广和信息推送的重要手段微信的开发显得尤为重要，便捷性、时效性、好的用户体验可以让用户尽可能的记住你从而对公众号或公司做到较大程度的宣传和推广。依托于腾讯的强大平台和数亿万级的用户群体把微信称作移动端所有网页的入口一点也不为过。</p>
<p>这篇文章的初衷是把自己写过的代码收集起来方便下次使用，桌面的文件实在太多了导致每次达到满屏的时候就需要新建一次文件夹然后把所有文件一拷贝就随手扔进其他盘里了，这样做最大的问题就是等下次需要的时候各种找然后各种找不到，不知道大家有木有这么干过，说到这里就不得不上一张截图晒晒桌面了，求勿喷！</p>
<p><img class="aligncenter size-large wp-image-1556" src="http://www.52smile.cn/wp-content/uploads/2014/12/desktop20141205142427-600x375.jpg" alt="desktop20141205142427" width="600" height="375" /></p>
<p>有点话多了，不好意思，为了凑篇幅我真是无节操到家了！</p>
<p>如题，这篇文章主要说微信公众账号的网页授权问题，目前网页授权只允许已认证的服务号才有权限，网页授权一般用于公众号获取用户基本信息或实现一键登录，类似于新浪微博、QQ登录等。实现微信的授权登录可以在很大程度上解决用户登录繁琐和安全性问题对用户体验尤为重要，其中最好的例子可参考招行信用卡、微社区等。</p>
<p>微信OAuth2.0授权登录让微信用户使用微信身份安全登录第三方应用或网站，在微信用户授权登录已接入微信OAuth2.0的第三方应用后，第三方可以获取到用户的接口调用凭证（access_token），通过access_token可以进行微信开放平台授权关系接口调用，从而可实现获取微信用户基本开放信息和帮助用户实现基础开放功能等。</p>
<p>注：获取用户信息的方式有两种，一种是在用户和公众号进行交互时获取，另一种就是网页授权的方式，本文只讲解网页授权的方式。</p>
<p><strong><span style="color: #ff6600;">公众后台设置</span><em>：在微信公众号请求用户网页授权之前，开发者需要先到公众平台网站的我的服务页中配置授权回调域名。请注意，这里填写的域名不要加http://</em></strong></p>
<p>关于配置授权回调域名的说明：</p>
<pre>授权回调域名配置规范为全域名，比如需要网页授权的域名为：www.qq.com，配置以后此域名下面的页面<a class="external free" href="http://www.qq.com/music.html" target="_blank" rel="nofollow">http://www.qq.com/music.html</a> 、 <a class="external free" href="http://www.qq.com/login.html" target="_blank" rel="nofollow">http://www.qq.com/login.html</a> 都可以进行OAuth2.0鉴权。但<a class="external free" href="http://pay.qq.com/" target="_blank" rel="nofollow">http://pay.qq.com</a> 、 <a class="external free" href="http://music.qq.com/" target="_blank" rel="nofollow">http://music.qq.com</a> 、 <a class="external free" href="http://qq.com/" target="_blank" rel="nofollow">http://qq.com</a>  无法进行OAuth2.0鉴权</pre>
<p><strong>网页授权基本流程：</strong></p>
<p>具体而言，网页授权流程分为四步：</p>
<ol>
<li>引导用户进入授权页面同意授权，获取code</li>
<li>通过code换取网页授权access_token（与基础支持中的access_token不同）</li>
<li>如果需要，开发者可以刷新网页授权access_token，避免过期</li>
<li>通过网页授权access_token和openid获取用户基本信息</li>
</ol>
<p>在公众平台设置好回调域名之后，即可进行以下开发：</p>
<p>略去文档说明部分【点击了解】：http://mp.weixin.qq.com/wiki/index.php?title=%E7%BD%91%E9%A1%B5%E6%8E%88%E6%9D%83%E8%8E%B7%E5%8F%96%E7%94%A8%E6%88%B7%E5%9F%BA%E6%9C%AC%E4%BF%A1%E6%81%AF</p>
<p><strong>授权入口：http://xxx.qq.com/access.php (此处access.php为授权页入口，文件名自定义)</strong></p>
<p><strong>授权页【授权弹框页面】：http://xxx.qq.com/oauth.php (用户访问入口页面进行鉴权，用户可选择“允许”或“取消”)</strong></p>
<p><strong>代码：</strong><br />
access.php</p>
<div class="codecolorer-container php blackboard" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br />11<br />12<br />13<br />14<br />15<br />16<br />17<br />18<br />19<br />20<br />21<br />22<br />23<br />24<br />25<br />26<br />27<br />28<br />29<br />30<br />31<br />32<br />33<br />34<br />35<br />36<br />37<br />38<br />39<br />40<br />41<br />42<br />43<br />44<br />45<br />46<br />47<br />48<br />49<br />50<br />51<br />52<br />53<br />54<br />55<br />56<br />57<br />58<br />59<br />60<br />61<br />62<br />63<br />64<br />65<br />66<br /></div></td><td><div class="php codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #000000; font-weight: bold;">&lt;?php</span><br />
<span style="color: #990000;">session_start</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<span style="color: #990000;">header</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;Content-Type:text/html;charset=utf-8&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<span style="color: #990000;">define</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;APPID&quot;</span><span style="color: #339933;">,</span><span style="color: #0000ff;">&quot;*************&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">//appid,在公众后台开发模式查看</span><br />
<span style="color: #990000;">define</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;REDIRECT_URI&quot;</span><span style="color: #339933;">,</span><span style="color: #0000ff;">&quot;http://xx.qq.com/oauth.php&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">//授权页</span><br />
<span style="color: #666666; font-style: italic;">//授权首页，判断是否授权</span><br />
<span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #990000;">isset</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$_SESSION</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'loginstatus'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><br />
<span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; <span style="color: #666666; font-style: italic;">//判断access_token是否可用</span><br />
&nbsp; &nbsp; <span style="color: #000088;">$access_token</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$_SESSION</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'loginstatus'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'access_token'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <span style="color: #000088;">$refresh_token</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$_SESSION</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'loginstatus'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'refresh_token'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <span style="color: #000088;">$openid</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$_SESSION</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'loginstatus'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'openid'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <span style="color: #666666; font-style: italic;">//换取用户信息</span><br />
&nbsp; &nbsp; <span style="color: #000088;">$userinfo_url</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;https://api.weixin.qq.com/sns/userinfo?access_token=<span style="color: #006699; font-weight: bold;">$access_token</span>&amp;openid=<span style="color: #006699; font-weight: bold;">$openid</span>&amp;lang=zh_CN&quot;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <span style="color: #000088;">$userinfo_json</span> <span style="color: #339933;">=</span> https_request<span style="color: #009900;">&#40;</span><span style="color: #000088;">$userinfo_url</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <span style="color: #000088;">$userinfo_array</span> <span style="color: #339933;">=</span> <span style="color: #990000;">json_decode</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$userinfo_json</span><span style="color: #339933;">,</span><span style="color: #009900; font-weight: bold;">true</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #990000;">array_key_exists</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;errcode&quot;</span><span style="color: #339933;">,</span><span style="color: #000088;">$userinfo_array</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><br />
&nbsp; &nbsp; <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$userinfo_array</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'errcode'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">==</span> <span style="color: #0000ff;">'42001'</span> <span style="color: #339933;">||</span> <span style="color: #000088;">$userinfo_array</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'errcode'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">==</span> <span style="color: #0000ff;">'40001'</span><span style="color: #009900;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #666666; font-style: italic;">/*由于access_token拥有较短的有效期，当access_token超时后，可以使用refresh_token进行刷新，refresh_token拥有较长的有效期（7天、30天、60天、90天），当refresh_token失效的后，需要用户重新授权。，此步骤用于解决该问题！*/</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #666666; font-style: italic;">//access_token超时，刷新access_token</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000088;">$access_token_url</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;https://api.weixin.qq.com/sns/oauth2/refresh_token?appid=&quot;</span><span style="color: #339933;">.</span>APPID<span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;&amp;grant_type=refresh_token&amp;refresh_token=<span style="color: #006699; font-weight: bold;">$refresh_token</span>&quot;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000088;">$access_token_json</span> <span style="color: #339933;">=</span> https_request<span style="color: #009900;">&#40;</span><span style="color: #000088;">$access_token_url</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000088;">$access_token_array</span> <span style="color: #339933;">=</span> <span style="color: #990000;">json_decode</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$access_token_json</span><span style="color: #339933;">,</span><span style="color: #009900; font-weight: bold;">true</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #990000;">array_key_exists</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;errcode&quot;</span><span style="color: #339933;">,</span><span style="color: #000088;">$access_token_array</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #990000;">header</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;Location:https://open.weixin.qq.com/connect/oauth2/authorize?appid=&quot;</span><span style="color: #339933;">.</span>APPID<span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;&amp;redirect_uri=&quot;</span><span style="color: #339933;">.</span>REDIRECT_URI<span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;&amp;response_type=code&amp;scope=snsapi_userinfo&amp;state=STATE#wechat_redirect&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">else</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #666666; font-style: italic;">//更新SESSION</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000088;">$_SESSION</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'loginstatus'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'access_token'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$access_token_array</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'access_token'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000088;">$access_token</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$access_token_array</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'access_token'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000088;">$userinfo_url</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;https://api.weixin.qq.com/sns/userinfo?access_token=<span style="color: #006699; font-weight: bold;">$access_token</span>&amp;openid=<span style="color: #006699; font-weight: bold;">$openid</span>&amp;lang=zh_CN&quot;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000088;">$userinfo_json</span> <span style="color: #339933;">=</span> https_request<span style="color: #009900;">&#40;</span><span style="color: #000088;">$userinfo_url</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000088;">$userinfo_array</span> <span style="color: #339933;">=</span> <span style="color: #990000;">json_decode</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$userinfo_json</span><span style="color: #339933;">,</span><span style="color: #009900; font-weight: bold;">true</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&#125;</span><br />
&nbsp; &nbsp; <span style="color: #009900;">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #666666; font-style: italic;">//打印用户基本信息</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #666666; font-style: italic;">/*返回信息：openid,昵称(nickname)，性别(sex,1男，2女),省份(province),城市(city),国家(country),头像(headimgurl),用户特权信息(privilege)*/</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #990000;">var_dump</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$userinfo_array</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
<span style="color: #009900;">&#125;</span><br />
<span style="color: #b1b100;">else</span><br />
<span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; <span style="color: #666666; font-style: italic;">//未授权,进行授权【此步骤进入授权页】</span><br />
&nbsp; &nbsp; <span style="color: #990000;">header</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;Location:https://open.weixin.qq.com/connect/oauth2/authorize?appid=&quot;</span><span style="color: #339933;">.</span>APPID<span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;&amp;redirect_uri=&quot;</span><span style="color: #339933;">.</span>REDIRECT_URI<span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;&amp;response_type=code&amp;scope=snsapi_userinfo&amp;state=STATE#wechat_redirect&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<span style="color: #009900;">&#125;</span><br />
<br />
<span style="color: #000000; font-weight: bold;">function</span> https_request<span style="color: #009900;">&#40;</span><span style="color: #000088;">$url</span><span style="color: #009900;">&#41;</span><br />
<span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; <span style="color: #000088;">$curl</span> <span style="color: #339933;">=</span> <span style="color: #990000;">curl_init</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <span style="color: #990000;">curl_setopt</span><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;">$url</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <span style="color: #990000;">curl_setopt</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$curl</span><span style="color: #339933;">,</span>CURLOPT_SSL_VERIFYPEER<span style="color: #339933;">,</span><span style="color: #009900; font-weight: bold;">FALSE</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <span style="color: #990000;">curl_setopt</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$curl</span><span style="color: #339933;">,</span>CURLOPT_SSL_VERIFYHOST<span style="color: #339933;">,</span><span style="color: #009900; font-weight: bold;">FALSE</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <span style="color: #990000;">curl_setopt</span><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><br />
&nbsp; &nbsp; <span style="color: #000088;">$data</span> <span style="color: #339933;">=</span> <span style="color: #990000;">curl_exec</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$curl</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #990000;">curl_errno</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$curl</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><br />
&nbsp; &nbsp; <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">return</span> <span style="color: #0000ff;">'ERROR '</span><span style="color: #339933;">.</span><span style="color: #990000;">curl_error</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$curl</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <span style="color: #009900;">&#125;</span><br />
&nbsp; &nbsp; <span style="color: #990000;">curl_close</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$curl</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <span style="color: #b1b100;">return</span> <span style="color: #000088;">$data</span><span style="color: #339933;">;</span><br />
<span style="color: #009900;">&#125;</span></div></td></tr></tbody></table></div>
<p>oauth.php<br />
</code></p>
<div class="codecolorer-container php blackboard" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br />11<br />12<br />13<br />14<br />15<br />16<br />17<br />18<br />19<br />20<br />21<br />22<br />23<br />24<br />25<br />26<br />27<br />28<br />29<br />30<br />31<br />32<br />33<br />34<br />35<br />36<br />37<br />38<br />39<br />40<br />41<br />42<br />43<br />44<br />45<br />46<br />47<br />48<br />49<br />50<br />51<br />52<br />53<br />54<br />55<br />56<br /></div></td><td><div class="php codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #000000; font-weight: bold;">&lt;?php</span><br />
<span style="color: #990000;">session_start</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<span style="color: #990000;">header</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;Content-Type:text/html;charset=utf-8&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<span style="color: #666666; font-style: italic;">//获得code</span><br />
<span style="color: #000088;">$code</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$_GET</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'code'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span><br />
login<span style="color: #009900;">&#40;</span><span style="color: #000088;">$code</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<span style="color: #666666; font-style: italic;">//进行授权</span><br />
<br />
<span style="color: #000000; font-weight: bold;">function</span> login<span style="color: #009900;">&#40;</span><span style="color: #000088;">$code</span><span style="color: #009900;">&#41;</span><br />
<span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; <span style="color: #000088;">$appid</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;*******************&quot;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <span style="color: #000088;">$appsecret</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;*****************************&quot;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <span style="color: #000088;">$access_token</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;&quot;</span><span style="color: #339933;">;</span><br />
<br />
&nbsp; &nbsp; <span style="color: #666666; font-style: italic;">//根据code获取access_token</span><br />
&nbsp; &nbsp; <span style="color: #000088;">$access_token_url</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;https://api.weixin.qq.com/sns/oauth2/access_token?appid=<span style="color: #006699; font-weight: bold;">$appid</span>&amp;secret=<span style="color: #006699; font-weight: bold;">$appsecret</span>&amp;code=<span style="color: #006699; font-weight: bold;">$code</span>&amp;grant_type=authorization_code&quot;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <span style="color: #000088;">$access_token_json</span> <span style="color: #339933;">=</span> https_request<span style="color: #009900;">&#40;</span><span style="color: #000088;">$access_token_url</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <span style="color: #000088;">$access_token_array</span> <span style="color: #339933;">=</span> <span style="color: #990000;">json_decode</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$access_token_json</span><span style="color: #339933;">,</span><span style="color: #009900; font-weight: bold;">true</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #990000;">array_key_exists</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;errcode&quot;</span><span style="color: #339933;">,</span><span style="color: #000088;">$access_token_array</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><br />
&nbsp; &nbsp; <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #666666; font-style: italic;">//取消授权</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$access_token_array</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'errcode'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">==</span> <span style="color: #0000ff;">'40029'</span><span style="color: #009900;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">'取消授权!'</span><span style="color: #339933;">;</span> &nbsp;<span style="color: #666666; font-style: italic;">//点击取消按钮后操作，可自行定义</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">else</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;errorcode: &quot;</span><span style="color: #339933;">.</span><span style="color: #000088;">$access_token_array</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'errcode'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;errormsg: &quot;</span><span style="color: #339933;">.</span><span style="color: #000088;">$access_token_array</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'errmsg'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&#125;</span><br />
&nbsp; &nbsp; <span style="color: #009900;">&#125;</span><br />
&nbsp; &nbsp; <span style="color: #b1b100;">else</span><br />
&nbsp; &nbsp; <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #666666; font-style: italic;">//获取access_token成功,将其保存到session</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000088;">$_SESSION</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'loginstatus'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'access_token'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$access_token_array</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'access_token'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000088;">$_SESSION</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'loginstatus'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'refresh_token'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$access_token_array</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'refresh_token'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000088;">$_SESSION</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'loginstatus'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'openid'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$access_token_array</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'openid'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #990000;">header</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;Location:/access.php&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> &nbsp;<span style="color: #666666; font-style: italic;">//返回入口页面，授权成功获取用户信息，不成功则再次进入该页面！</span><br />
&nbsp; &nbsp; <span style="color: #009900;">&#125;</span><br />
<span style="color: #009900;">&#125;</span><br />
<br />
<span style="color: #000000; font-weight: bold;">function</span> https_request<span style="color: #009900;">&#40;</span><span style="color: #000088;">$url</span><span style="color: #009900;">&#41;</span><br />
<span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; <span style="color: #000088;">$curl</span> <span style="color: #339933;">=</span> <span style="color: #990000;">curl_init</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <span style="color: #990000;">curl_setopt</span><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;">$url</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <span style="color: #990000;">curl_setopt</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$curl</span><span style="color: #339933;">,</span>CURLOPT_SSL_VERIFYPEER<span style="color: #339933;">,</span><span style="color: #009900; font-weight: bold;">FALSE</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <span style="color: #990000;">curl_setopt</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$curl</span><span style="color: #339933;">,</span>CURLOPT_SSL_VERIFYHOST<span style="color: #339933;">,</span><span style="color: #009900; font-weight: bold;">FALSE</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <span style="color: #990000;">curl_setopt</span><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><br />
&nbsp; &nbsp; <span style="color: #000088;">$data</span> <span style="color: #339933;">=</span> <span style="color: #990000;">curl_exec</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$curl</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #990000;">curl_errno</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$curl</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><br />
&nbsp; &nbsp; <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">return</span> <span style="color: #0000ff;">'ERROR '</span><span style="color: #339933;">.</span><span style="color: #990000;">curl_error</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$curl</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <span style="color: #009900;">&#125;</span><br />
&nbsp; &nbsp; <span style="color: #990000;">curl_close</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$curl</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <span style="color: #b1b100;">return</span> <span style="color: #000088;">$data</span><span style="color: #339933;">;</span><br />
<span style="color: #009900;">&#125;</span><br />
<span style="color: #000000; font-weight: bold;">?&gt;</span></div></td></tr></tbody></table></div>
<p>具体操作可根据需求自行编程，例如进行账号绑定或用户信息保存等操作，详细参数和返回错误代码可查看微信官方文档，<a href="http://mp.weixin.qq.com/wiki" title="官方文档wiki" target="_blank"></a>,如有不明白或上文中出现的错误请指正，谢谢？</p>
]]></content:encoded>
			<wfw:commentRss>https://www.52smile.cn/?feed=rss2&#038;p=1555</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
		<item>
		<title>为微信号代盐，送明信片！</title>
		<link>https://www.52smile.cn/?p=1399</link>
		<comments>https://www.52smile.cn/?p=1399#comments</comments>
		<pubDate>Fri, 22 Aug 2014 02:01:32 +0000</pubDate>
		<dc:creator><![CDATA[子涛]]></dc:creator>
				<category><![CDATA[精彩分享]]></category>
		<category><![CDATA[微信]]></category>
		<category><![CDATA[拓落邦]]></category>
		<category><![CDATA[订阅号]]></category>

		<guid isPermaLink="false">http://www.52smile.cn/?p=1399</guid>
		<description><![CDATA[<a href="https://www.52smile.cn/?p=1399"><img width="700" height="220" src="http://www.52smile.cn/wp-content/uploads/2014/08/mingxinpian20140822b-700x220.jpg" class="attachment-post-thumbnail wp-post-image" alt="mingxinpian20140822b" itemprop="image" lazyload="1" /></a>那些年我们略带青涩踏入校园，体会着生命中短暂的无忧无虑，尽情的挥洒着属于我们的青春，时光荏苒，青春不再，最美时光渐行渐远，唯一不变的是我们永远青春的心和奋斗一生的梦想！ 是否还记得人生中的第一张明信片，充满稚气的文字和略显朴实的语言，然后傻傻的露出微笑！ “拓落邦”最美明信片，为你寄去年少的回忆和最美的祝福，微不足道的]]></description>
				<content:encoded><![CDATA[<a href="https://www.52smile.cn/?p=1399"><img width="700" height="220" src="http://www.52smile.cn/wp-content/uploads/2014/08/mingxinpian20140822b-700x220.jpg" class="attachment-post-thumbnail wp-post-image" alt="mingxinpian20140822b" itemprop="image" lazyload="1" /></a><p style="color: #3e3e3e;">那些年我们略带青涩踏入校园，体会着生命中短暂的无忧无虑，尽情的挥洒着属于我们的青春，时光荏苒，青春不再，最美时光渐行渐远，唯一不变的是我们永远青春的心和奋斗一生的梦想！</p>
<p style="color: #3e3e3e;">是否还记得人生中的第一张明信片，充满稚气的文字和略显朴实的语言，然后傻傻的露出微笑！</p>
<p style="color: #3e3e3e;">“拓落邦”最美明信片，为你寄去年少的回忆和最美的祝福，微不足道的行动只愿为你在平凡的生活中增添一点色彩！</p>
<p style="color: #3e3e3e;"><strong><span style="color: #ff0000;">申领条件：</span></strong></p>
<p style="color: #3e3e3e;"><span style="color: #000000;">关注“拓落邦”微信订阅号的所有人即可申请，每个账号限申请一张！</span></p>
<p style="color: #3e3e3e;"><strong><span style="color: #ff0000;">提交信息：</span></strong></p>
<p style="color: #3e3e3e;"><span style="color: #000000;">姓名</span><strong><span style="color: #000000;"><br />
</span></strong></p>
<p style="color: #3e3e3e;"><span style="color: #000000;">电话</span></p>
<p style="color: #3e3e3e;">详细地址（邮寄地址）</p>
<p style="color: #3e3e3e;">例如：</p>
<p style="color: #3e3e3e;"><img src="http://mmbiz.qpic.cn/mmbiz/T5Y1SyPS2ZRicUmAGJ6fyh8MIgjcPgrmSXLiby7QOHwtHDN2L6NAVjWQfeZ3h5WUzlwcDxKsxISIz9xmP0TcrBpg/640" alt="" data-s="300,640" data-src="http://mmbiz.qpic.cn/mmbiz/T5Y1SyPS2ZRicUmAGJ6fyh8MIgjcPgrmSXLiby7QOHwtHDN2L6NAVjWQfeZ3h5WUzlwcDxKsxISIz9xmP0TcrBpg/0" data-ratio="0.5264270613107822" data-w="473" /></p>
<p style="color: #3e3e3e;"><span style="color: #4f81bd;">明信片将会在1~15个工作日内发放到每位拓友手中，如果有问题可联系QQ：568125403</span></p>
<p style="color: #3e3e3e;"><span style="color: #ff6600;"><strong>微信卡片：</strong></span></p>
<figure id="attachment_1401" style="width: 600px;" class="wp-caption aligncenter"><a href="http://www.52smile.cn/wp-content/uploads/2014/08/taluobang.png"><img class="wp-image-1401 size-large" src="http://www.52smile.cn/wp-content/uploads/2014/08/taluobang-600x409.png" alt="taluobang" width="600" height="409" /></a><figcaption class="wp-caption-text">本人非美工，对ps也是相当初级，请见谅！</figcaption></figure>
<p style="color: #3e3e3e;"><strong><span style="color: #ff0000;">明信片样板：</span></strong></p>
<p style="color: #3e3e3e;"><strong><span style="color: #ff0000;"><img class="aligncenter" src="http://mmbiz.qpic.cn/mmbiz/T5Y1SyPS2ZRicUmAGJ6fyh8MIgjcPgrmSUV4dN5GdQVmaB4FGcvm42X4ZJThzcRfhOw2Wic8NpHlzCXs1ibSEK4YQ/640" alt="" width="640" height="336" data-s="300,640" data-src="http://mmbiz.qpic.cn/mmbiz/T5Y1SyPS2ZRicUmAGJ6fyh8MIgjcPgrmSUV4dN5GdQVmaB4FGcvm42X4ZJThzcRfhOw2Wic8NpHlzCXs1ibSEK4YQ/0" data-ratio="0.525691699604743" data-w="" /></span></strong></p>
<p style="color: #3e3e3e;"><strong><span style="color: #ff0000;"><img class="aligncenter" src="http://mmbiz.qpic.cn/mmbiz/T5Y1SyPS2ZRicUmAGJ6fyh8MIgjcPgrmS3glSWU8pzWiaf6PtXoqcbfGtHX5fSbXHWzYlict2ic2OSLAZJBwUwZo4w/640" alt="" width="640" height="336" data-s="300,640" data-src="http://mmbiz.qpic.cn/mmbiz/T5Y1SyPS2ZRicUmAGJ6fyh8MIgjcPgrmS3glSWU8pzWiaf6PtXoqcbfGtHX5fSbXHWzYlict2ic2OSLAZJBwUwZo4w/0" data-ratio="0.525691699604743" data-w="" /></span></strong></p>
<p style="color: #3e3e3e;"><span style="color: #ff0000;">因为考虑到第一期活动会遇到很多不确定因素，明信片暂定为随机发送，每一张明信片我都会经过详细的审查确保每张明信片的质量和所印图片尽量能够让拓友们满意，谢谢！</span></p>
<figure id="attachment_1353" style="width: 258px;" class="wp-caption aligncenter"><img class="wp-image-1353 size-full" src="http://www.52smile.cn/wp-content/uploads/2014/05/qrcode_for_gh_4060779f94ab_258.jpg" alt="qrcode_for_gh_4060779f94ab_258" width="258" height="258" /><figcaption class="wp-caption-text">“扫一扫”关注</figcaption></figure>
<hr />
<h2><span style="color: #ff6600;"><strong>同时希望有热心的朋友分享些关于微信公众号推广的经验，在此感激不尽！</strong></span></h2>
<p style="color: #3e3e3e;">
]]></content:encoded>
			<wfw:commentRss>https://www.52smile.cn/?feed=rss2&#038;p=1399</wfw:commentRss>
		<slash:comments>19</slash:comments>
		</item>
		<item>
		<title>“忙”了，生活也便充实了！</title>
		<link>https://www.52smile.cn/?p=1351</link>
		<comments>https://www.52smile.cn/?p=1351#comments</comments>
		<pubDate>Wed, 21 May 2014 08:47:07 +0000</pubDate>
		<dc:creator><![CDATA[子涛]]></dc:creator>
				<category><![CDATA[生活随笔]]></category>
		<category><![CDATA[微信]]></category>
		<category><![CDATA[生活]]></category>
		<category><![CDATA[订阅号]]></category>

		<guid isPermaLink="false">http://www.52smile.cn/?p=1351</guid>
		<description><![CDATA[<a href="https://www.52smile.cn/?p=1351"><img width="640" height="221" src="http://www.52smile.cn/wp-content/uploads/2014/05/20140521.jpg" class="attachment-post-thumbnail wp-post-image" alt="20140521" itemprop="image" lazyload="1" /></a>平淡无奇的生活如同看惯了的景色，色相还在但缺少了欣赏的兴致。每天往返于公司和“家”之间，2点一线的生活如同来往的公交车，只要没什么特殊情况，点线依旧，时间久了车钝了、人也懒惰了，也没有激情了！ 每个人的生活轨迹不尽相同，或颇为洒脱，或如水平淡，不同的方式，不一样的调调~，我是一个比较喜欢孤立前行的人，不希望生活中借助任]]></description>
				<content:encoded><![CDATA[<a href="https://www.52smile.cn/?p=1351"><img width="640" height="221" src="http://www.52smile.cn/wp-content/uploads/2014/05/20140521.jpg" class="attachment-post-thumbnail wp-post-image" alt="20140521" itemprop="image" lazyload="1" /></a><p>平淡无奇的生活如同看惯了的景色，色相还在但缺少了欣赏的兴致。每天往返于公司和“家”之间，2点一线的生活如同来往的公交车，只要没什么特殊情况，点线依旧，时间久了车钝了、人也懒惰了，也没有激情了！</p>
<p>每个人的生活轨迹不尽相同，或颇为洒脱，或如水平淡，不同的方式，不一样的调调~，我是一个比较喜欢孤立前行的人，不希望生活中借助任何的外力促成自己趋于完美的想法，这或许是一种强迫症的行为，也或是对追求某一种事物而对其苛求完美的一种尊重！不管如何，由此开始，随处可往，坚信会是如此！</p>
<p>这几天加班了，真的，加班了，脸上也有了冒痘的迹象，想想已经有几年没见过脸上长痘了，可能是生活太过安逸，也或是思密达的化妆品效果还可以，虽然天天下班回家脸上的油渍刮下来能炒一锅蒜薹肉丝，且剩下的还能拌份拍黄瓜，但相比脸上满是痘痘的场景还是颇感欣慰。加班+颇感颓废+脸上油光滑面，莫名感觉是个很熟悉的身影，是的，自己离真的程序员更近了。</p>
<p>最近做了个艰难的决定，虽然有些许冲动但发现也就那样而已，只不过在工资没涨的情况下支出又有所上浮了，也是对自己即将面临婚姻大事之前的一个准备工作，租住的20平单间已经整整住了3年了，留恋什么的虽说不上，但还是非常感谢从学校出来后给予的这3年温暖，虽然没有完全的归属感但也算是一个可以依靠的“家”，工作趋于稳定，生活也将面临改观，也算是自己辛辛苦苦上班的犒赏吧。从20平到80多平，生活质量提高了，心态什么的也应该有所改变了，压力什么的也会更有挑战性，希望该来的都来吧，趁年轻还扛得住！</p>
<p>平淡无奇可能更容易让人忽略一些东西，长此以往可能觉得一切都不重要了，人的懒惰就是这么来的。忙可能更让人容易疲惫，但太松也想必更让人头疼，所谓的个人能力价值就是在忙碌中发掘出来的，至少时不时的紧一紧生活可能更觉充实！</p>
<hr />
<p>都说在搞微信，虽然腾讯一再的划分订阅号和服务号的界限，并且接口权限什么的也是大幅度改变。还是一句话，腾讯的一贯手段，先培养再开刀，贴的近的被搞得越狠，it界的一贯法则，没有免费的午餐，昨儿还说永久免费，可能指不定什么时候就开始各种币，然后你便宜也占了，东西还在他那（云端），钱该掏你还得掏，毕竟大家都得生活，其实也就不难理解了！</p>
<p>前段时间正巧公司搞微信，好多部门各种订阅号、服务号，每天上下班几乎一屏都是公司自己的账号和推送的各种文章、消息逼得你不看都得看，也算是在路上打发无聊吧。我自己也搞了个订阅号，弄个机器人、查查生活信息什么的也算是体验与自身吧，大家有兴趣不妨关注下，可以广提意见，也让我能在空闲时候好好来一番折腾！</p>
<p><img class="aligncenter size-full wp-image-1353" src="http://www.52smile.cn/wp-content/uploads/2014/05/qrcode_for_gh_4060779f94ab_258.jpg" alt="qrcode_for_gh_4060779f94ab_258" width="258" height="258" /></p>
<p><strong><span style="color: #ff0000;">使用微信“扫一扫”关注，也可搜索公众号“拓落邦”或输入微信号“taluobang”进行关注！万分感谢~</span></strong></p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>https://www.52smile.cn/?feed=rss2&#038;p=1351</wfw:commentRss>
		<slash:comments>45</slash:comments>
		</item>
	</channel>
</rss>
