<?xml version="1.0" encoding="UTF-8" ?>
<rss version="2.0">
<channel>
<title><![CDATA[向东博客 专注WEB应用 构架之美 --- 构架之美，在于尽态极妍 | 应用之美，在于药到病除]]></title> 
<link>http://www.jackxiang.com/index.php</link> 
<description><![CDATA[赢在IT，Playin' with IT,Focus on Killer Application,Marketing Meets Technology.]]></description> 
<language>zh-cn</language> 
<copyright><![CDATA[向东博客 专注WEB应用 构架之美 --- 构架之美，在于尽态极妍 | 应用之美，在于药到病除]]></copyright>
<item>
<link>http://www.jackxiang.com/post//</link>
<title><![CDATA[[测试通过]通过file_get_contents来Post数据的实例]]></title> 
<author>jack &lt;xdy108@126.com&gt;</author>
<category><![CDATA[WEB2.0]]></category>
<pubDate>Thu, 12 Feb 2009 06:48:08 +0000</pubDate> 
<guid>http://www.jackxiang.com/post//</guid> 
<description>
<![CDATA[ 
	file_get_contents.php: Post数据<br/><div class="code">&lt;?php <br/>function Post($url, $post = null)<br/>&#123;<br/>&nbsp;&nbsp;&nbsp;&nbsp;$context = array();<br/><br/>&nbsp;&nbsp;&nbsp;&nbsp;if (is_array($post))<br/>&nbsp;&nbsp;&nbsp;&nbsp;&#123;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ksort($post);<br/><br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$context&#91;&#039;http&#039;&#93; = array<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&#039;method&#039; =&gt; &#039;POST&#039;,<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&#039;content&#039; =&gt; http_build_query($post, &#039;&#039;, &#039;&amp;&#039;),<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;);<br/>&nbsp;&nbsp;&nbsp;&nbsp;&#125;<br/><br/>&nbsp;&nbsp;&nbsp;&nbsp;return file_get_contents($url, false, stream_context_create($context));<br/>&#125;<br/><br/>$data = array<br/>(<br/>&nbsp;&nbsp;&nbsp;&nbsp;&#039;name&#039; =&gt; &#039;test&#039;,<br/>&nbsp;&nbsp;&nbsp;&nbsp;&#039;email&#039; =&gt; &#039;test@gmail.com&#039;,<br/>&nbsp;&nbsp;&nbsp;&nbsp;&#039;submit&#039; =&gt; &#039;submit&#039;,<br/>);<br/><br/>echo Post(&#039;http://localhost/5-5/request_post_result.php&#039;, $data); <br/>?&gt;</div><br/>接收数据：<br/><br/><br/>request_post_result.php&nbsp;&nbsp;接收经过Post的数据：<br/><div class="code">&lt;?php<br/>echo $_POST&#91;&#039;name&#039;&#93;;<br/>echo $_POST&#91;&#039;email&#039;&#93;;<br/>echo $_POST&#91;&#039;submit&#039;&#93;;<br/>echo &quot;fdfd&quot;;<br/>?&gt;</div><br/><br/>更加简洁：<br/><textarea name="code" class="php" rows="15" cols="100">
$context[&#039;http&#039;] = array(
&nbsp;&nbsp;&quot;method&quot; =&gt; &quot;POST&quot;,
&nbsp;&nbsp;&quot;content&quot; =&gt; http_build_query($_POST)
);


$ret = file_get_contents(MSURL.&quot;/php/interface/PostUrl.php&quot; , false , stream_context_create($context));
echo $ret;
</textarea>
]]>
</description>
</item><item>
<link>http://www.jackxiang.com/post//#blogcomment</link>
<title><![CDATA[[评论] [测试通过]通过file_get_contents来Post数据的实例]]></title> 
<author> &lt;user@domain.com&gt;</author>
<category><![CDATA[评论]]></category>
<pubDate>Thu, 01 Jan 1970 00:00:00 +0000</pubDate> 
<guid>http://www.jackxiang.com/post//#blogcomment</guid> 
<description>
<![CDATA[ 
	
]]>
</description>
</item>
</channel>
</rss>