<?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>狂人山庄 &#124; Silence,声仔,吴洪声,奶罩 &#187; api</title>
	<atom:link href="http://wuhongsheng.com/tag/api/feed/" rel="self" type="application/rss+xml" />
	<link>http://wuhongsheng.com</link>
	<description>响应我党号召,全面建设和谐博客,坚持和谐写博的路线不动摇</description>
	<lastBuildDate>Mon, 14 Jun 2010 06:54:41 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>DNSPod API 调用实例</title>
		<link>http://wuhongsheng.com/life/2008/12/dnspod-api-examples/</link>
		<comments>http://wuhongsheng.com/life/2008/12/dnspod-api-examples/#comments</comments>
		<pubDate>Mon, 01 Dec 2008 03:06:25 +0000</pubDate>
		<dc:creator>吴洪声</dc:creator>
				<category><![CDATA[生活]]></category>
		<category><![CDATA[api]]></category>
		<category><![CDATA[curl]]></category>
		<category><![CDATA[developer]]></category>
		<category><![CDATA[dns]]></category>
		<category><![CDATA[dnspod]]></category>

		<guid isPermaLink="false">http://wuhongsheng.com/life/2008/12/dnspod-api-examples/</guid>
		<description><![CDATA[例子代码PHP+CURL 提交请求的函数 function postData&#40;$url, $data&#41; &#123; $data = http_build_query&#40;$data&#41;; &#160; $ch = curl_init&#40;&#41;; curl_setopt&#40;$ch, CURLOPT_URL, $url&#41;; // curl_setopt($ch, CURLOPT_HEADER, 1); // curl_setopt($ch, CURLOPT_VERBOSE, 1); curl_setopt&#40;$ch, CURLOPT_POST, 1&#41;; curl_setopt&#40;$ch, CURLOPT_RETURNTRANSFER, 1&#41;; curl_setopt&#40;$ch, CURLOPT_POSTFIELDS, $data&#41;; &#160; $response = curl_exec&#40;$ch&#41;; curl_close&#40;$ch&#41;; &#160; return $response; &#125; 添加一个新域名 $data = array&#40;'login_email' =&#62; 'foo@bar.com', 'login_password' =&#62; 'password', 'format' =&#62; 'xml', 'domain' [...]


Related posts:<ol><li><a href='http://wuhongsheng.com/it/2010/03/mac-vpn-split-route/' rel='bookmark' title='Permanent Link: Mac下VPN设置多网关，让国内流量不走国外'>Mac下VPN设置多网关，让国内流量不走国外</a> <small>经常要翻墙，但又不想访问国内网站的时候也走国外的VPN。简单写了个脚本，让国内的流量直接走国内的网关，国外网站则走VPN。这样每次上网都可以直接拨上VPN，又不影响网站的访问。 使用方法：Mac下先设置所有流量走VPN，拨上VPN后，用root权限（sudo）执行下面的脚本。 Mac OS X 10.6.2测试通过 #!/bin/sh # SCRIPT WRITTEN...</small></li>
</ol>

Related posts brought to you by <a href='http://mitcho.com/code/yarpp/'>Yet Another Related Posts Plugin</a>.]]></description>
			<content:encoded><![CDATA[<p>例子代码PHP+CURL</p>
<p>提交请求的函数</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">function</span> postData<span style="color: #009900;">&#40;</span><span style="color: #000088;">$url</span><span style="color: #339933;">,</span> <span style="color: #000088;">$data</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
	<span style="color: #000088;">$data</span>	<span style="color: #339933;">=</span> <span style="color: #990000;">http_build_query</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$data</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
	<span style="color: #000088;">$ch</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>
	<span style="color: #990000;">curl_setopt</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$ch</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>
	<span style="color: #666666; font-style: italic;">// curl_setopt($ch, CURLOPT_HEADER, 1);</span>
	<span style="color: #666666; font-style: italic;">// curl_setopt($ch, CURLOPT_VERBOSE, 1);</span>
	<span style="color: #990000;">curl_setopt</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$ch</span><span style="color: #339933;">,</span> CURLOPT_POST<span style="color: #339933;">,</span> <span style="color: #cc66cc;">1</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #990000;">curl_setopt</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$ch</span><span style="color: #339933;">,</span> CURLOPT_RETURNTRANSFER<span style="color: #339933;">,</span> <span style="color: #cc66cc;">1</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #990000;">curl_setopt</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$ch</span><span style="color: #339933;">,</span> CURLOPT_POSTFIELDS<span style="color: #339933;">,</span> <span style="color: #000088;">$data</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
	<span style="color: #000088;">$response</span>	<span style="color: #339933;">=</span> <span style="color: #990000;">curl_exec</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$ch</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #990000;">curl_close</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$ch</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
	<span style="color: #b1b100;">return</span> <span style="color: #000088;">$response</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

<p>添加一个新域名</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000088;">$data</span> <span style="color: #339933;">=</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'login_email'</span>		<span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'foo@bar.com'</span><span style="color: #339933;">,</span>
			<span style="color: #0000ff;">'login_password'</span>	<span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'password'</span><span style="color: #339933;">,</span>
			<span style="color: #0000ff;">'format'</span>			<span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'xml'</span><span style="color: #339933;">,</span>
			<span style="color: #0000ff;">'domain'</span>			<span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'test.com'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #b1b100;">echo</span> postData<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;http://www.dnspod.com/API/Domain.Create&quot;</span><span style="color: #339933;">,</span> <span style="color: #000088;">$data</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>获取单个域名的记录列表</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000088;">$data</span> <span style="color: #339933;">=</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'login_email'</span>		<span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'foo@bar.com, 
			'</span>login_password<span style="color: #0000ff;">'	=&gt; '</span>password<span style="color: #0000ff;">', 
			'</span>format<span style="color: #0000ff;">'			=&gt; '</span>xml<span style="color: #0000ff;">', 
			'</span>domain_id<span style="color: #0000ff;">'			=&gt; '</span><span style="color: #cc66cc;">123456</span><span style="color: #0000ff;">');
echo postData(&quot;http://www.dnspod.com/API/Record.List&quot;, $data);</span></pre></div></div>

<p>修改一条记录</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000088;">$data</span> <span style="color: #339933;">=</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'login_email'</span>		<span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'foo@bar.com'</span><span style="color: #339933;">,</span> 
			<span style="color: #0000ff;">'login_password'</span>	<span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'password'</span><span style="color: #339933;">,</span> 
			<span style="color: #0000ff;">'format'</span>			<span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'xml'</span><span style="color: #339933;">,</span> 
			<span style="color: #0000ff;">'domain_id'</span>			<span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'123456'</span><span style="color: #339933;">,</span> 
			<span style="color: #0000ff;">'record_id'</span>			<span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'7654321'</span><span style="color: #339933;">,</span> 
			<span style="color: #0000ff;">'sub_domain'</span>		<span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'test1234'</span><span style="color: #339933;">,</span> 
			<span style="color: #0000ff;">'record_type'</span>		<span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'1'</span><span style="color: #339933;">,</span> 
			<span style="color: #0000ff;">'record_line'</span>		<span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'1'</span><span style="color: #339933;">,</span> 
			<span style="color: #0000ff;">'value'</span>				<span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'127.0.0.1'</span><span style="color: #339933;">,</span> 
			<span style="color: #0000ff;">'mx'</span>				<span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'10'</span><span style="color: #339933;">,</span> 
			<span style="color: #0000ff;">'ttl'</span>				<span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'3600'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #b1b100;">echo</span> postData<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;http://www.dnspod.com/API/Record.Modify&quot;</span><span style="color: #339933;">,</span> <span style="color: #000088;">$data</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>



<p>Related posts:<ol><li><a href='http://wuhongsheng.com/it/2010/03/mac-vpn-split-route/' rel='bookmark' title='Permanent Link: Mac下VPN设置多网关，让国内流量不走国外'>Mac下VPN设置多网关，让国内流量不走国外</a> <small>经常要翻墙，但又不想访问国内网站的时候也走国外的VPN。简单写了个脚本，让国内的流量直接走国内的网关，国外网站则走VPN。这样每次上网都可以直接拨上VPN，又不影响网站的访问。 使用方法：Mac下先设置所有流量走VPN，拨上VPN后，用root权限（sudo）执行下面的脚本。 Mac OS X 10.6.2测试通过 #!/bin/sh # SCRIPT WRITTEN...</small></li>
</ol></p>
<p>Related posts brought to you by <a href='http://mitcho.com/code/yarpp/'>Yet Another Related Posts Plugin</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://wuhongsheng.com/life/2008/12/dnspod-api-examples/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>DNSPod 开放 API 接口完成</title>
		<link>http://wuhongsheng.com/it/2008/11/finish-dnpsod-api/</link>
		<comments>http://wuhongsheng.com/it/2008/11/finish-dnpsod-api/#comments</comments>
		<pubDate>Sun, 23 Nov 2008 15:11:53 +0000</pubDate>
		<dc:creator>吴洪声</dc:creator>
				<category><![CDATA[IT]]></category>
		<category><![CDATA[api]]></category>
		<category><![CDATA[dnspod]]></category>

		<guid isPermaLink="false">http://wuhongsheng.com/life/2008/11/finish-dnpsod-api/</guid>
		<description><![CDATA[周末又宅了两天在家里，宅出了成绩：完成了DNSPod的几个开放API接口 目前一共有7个公开API和1个私有的API，基本能满足大部分需求。数据返回支持XML和JSON 7个公开的API： Domain.Create Domain.List Domain.Remove Record.Create Record.List Record.Modify Record.Remove 1个私有的API： User.Create 现在API已经上线，具体的文档将会整理后发出来DNSPod API 列表。 目前使用API不收费。 Related posts:UUCall域名被clientHold Domain Name: UUCALL.COM Registrar: BEIJING INNOVATIVE LINKAGE TECHNOLOGY LTD. DBA... Mac下VPN设置多网关，让国内流量不走国外 经常要翻墙，但又不想访问国内网站的时候也走国外的VPN。简单写了个脚本，让国内的流量直接走国内的网关，国外网站则走VPN。这样每次上网都可以直接拨上VPN，又不影响网站的访问。 使用方法：Mac下先设置所有流量走VPN，拨上VPN后，用root权限（sudo）执行下面的脚本。 Mac OS X 10.6.2测试通过 #!/bin/sh # SCRIPT WRITTEN... Related posts brought to you by Yet Another Related Posts Plugin.


Related posts:<ol><li><a href='http://wuhongsheng.com/it/2009/10/uucall-com-clienthold/' rel='bookmark' title='Permanent Link: UUCall域名被clientHold'>UUCall域名被clientHold</a> <small>Domain Name: UUCALL.COM Registrar: BEIJING INNOVATIVE LINKAGE TECHNOLOGY LTD. DBA...</small></li>
<li><a href='http://wuhongsheng.com/it/2010/03/mac-vpn-split-route/' rel='bookmark' title='Permanent Link: Mac下VPN设置多网关，让国内流量不走国外'>Mac下VPN设置多网关，让国内流量不走国外</a> <small>经常要翻墙，但又不想访问国内网站的时候也走国外的VPN。简单写了个脚本，让国内的流量直接走国内的网关，国外网站则走VPN。这样每次上网都可以直接拨上VPN，又不影响网站的访问。 使用方法：Mac下先设置所有流量走VPN，拨上VPN后，用root权限（sudo）执行下面的脚本。 Mac OS X 10.6.2测试通过 #!/bin/sh # SCRIPT WRITTEN...</small></li>
</ol>

Related posts brought to you by <a href='http://mitcho.com/code/yarpp/'>Yet Another Related Posts Plugin</a>.]]></description>
			<content:encoded><![CDATA[<p>周末又宅了两天在家里，宅出了成绩：完成了DNSPod的几个开放API接口</p>
<p>目前一共有7个公开API和1个私有的API，基本能满足大部分需求。数据返回支持XML和JSON</p>
<p>7个公开的API：</p>
<p>Domain.Create</p>
<p>Domain.List</p>
<p>Domain.Remove</p>
<p>Record.Create</p>
<p>Record.List</p>
<p>Record.Modify</p>
<p>Record.Remove</p>
<p>1个私有的API：</p>
<p>User.Create</p>
<p>现在API已经上线，<del datetime="2008-11-26T09:03:21+00:00">具体的文档将会整理后发出来</del><a href="http://support.dnspod.com/index.php?_m=knowledgebase&#038;_a=viewarticle&#038;kbarticleid=43">DNSPod API 列表</a>。</p>
<p>目前使用API不收费。</p>


<p>Related posts:<ol><li><a href='http://wuhongsheng.com/it/2009/10/uucall-com-clienthold/' rel='bookmark' title='Permanent Link: UUCall域名被clientHold'>UUCall域名被clientHold</a> <small>Domain Name: UUCALL.COM Registrar: BEIJING INNOVATIVE LINKAGE TECHNOLOGY LTD. DBA...</small></li>
<li><a href='http://wuhongsheng.com/it/2010/03/mac-vpn-split-route/' rel='bookmark' title='Permanent Link: Mac下VPN设置多网关，让国内流量不走国外'>Mac下VPN设置多网关，让国内流量不走国外</a> <small>经常要翻墙，但又不想访问国内网站的时候也走国外的VPN。简单写了个脚本，让国内的流量直接走国内的网关，国外网站则走VPN。这样每次上网都可以直接拨上VPN，又不影响网站的访问。 使用方法：Mac下先设置所有流量走VPN，拨上VPN后，用root权限（sudo）执行下面的脚本。 Mac OS X 10.6.2测试通过 #!/bin/sh # SCRIPT WRITTEN...</small></li>
</ol></p>
<p>Related posts brought to you by <a href='http://mitcho.com/code/yarpp/'>Yet Another Related Posts Plugin</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://wuhongsheng.com/it/2008/11/finish-dnpsod-api/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>

<!-- Dynamic Page Served (once) in 2.477 seconds -->
