本文使用「署名 4.0 国际 (CC BY 4.0)」许可协议,欢迎转载、或重新修改使用,但需要注明来源。 [署名 4.0 国际 (CC BY 4.0)](https://creativecommons.org/licenses/by/4.0/deed.zh) 本文作者: 苏洋 创建时间: 2009年06月06日 统计字数: 1979字 阅读时间: 4分钟阅读 本文链接: https://soulteary.com/2009/06/06/php-how-to-post.html ----- # [php]Post数据总结 文章出处:http://hi.baidu.com/qfans/blog/item/33896c81dedc41d0bd3e1e71.html 似乎上面的兄弟也是从网上搜集来的...出处未知。 但是总结还是挺全的,除了使用管道或者调用其他程序的例子~ ```php array( 'method'=>'POST', 'header'=>'Content-type: application/x-www-form-urlencoded'."\r\n". 'User-Agent : Jimmy\'s POST Example beta'."\r\n". 'Content-length: '.strlen($post_string)+8, 'content'=>'mypost='.$post_string) ); $stream_context = stream_context_create($context); $data = file_get_contents($remote_server,FALSE,$stream_context); return $data; } ?> ```