求虚拟post提交 本帖最后由 bbbbbjt46 于 2013-05-30 12:21:18 编辑 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 function request_by_other($remote_server,$post_string){ $context = array( 'http'=>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;} 用php_curl吧,百度一下,看哪一个程序比较符合你所想要的。 新手求指点,PHP能否实现这样的效果? 请问一个全局变量的问题。 php问题 关于简化代码的问题...... php输出文件是否有大小限制 iframe中如何获取父窗口中设定的iframe名称? 新手求助! 如何实现这样分组排序?????? 怎么屏蔽php的探针?在线等! php如何实现热敏58MM小票打印机打印 新手PHP画图 imagecreateformjpeg和imagecreate区别是啥? flush()函数无效?不能实时刷新输出,如何解决呢?
$context = array(
'http'=>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;
}