<?php
$data = array ( "name" => 'test_name' , "content" => 'test_con' );
$data = http_build_query( $data );
$opts = array (
'http' => array (
'method' => "POST" ,
'header' => "Content-type: application/x-www-form-urlencoded\r\n" .
"Content-length:" . strlen ( $data ). "\r\n" .
"Cookie: foo=bar\r\n" .
"\r\n" ,
'content' => $data ,
)
);
$cxContext = stream_context_create( $opts );
$sFile = file_get_contents ( "http://127.0.0.1/reponse.php" , false, $cxContext );
echo $sFile ;
?>
// 结果
string(132) "array(2) { ["content"]=> string(8) "test_con" ["name"]=> string(9) "test_name" } array(1) { ["foo"]=> string(3) "bar" } "
最后修改:2022 年 07 月 11 日
© 允许规范转载
15 条评论
新盘首开 新盘首开 征召客户!!!coinsrore.com
新盘 上车集合 留下 我要发发 立马进裙
真棒!
博主太厉害了!
博主太厉害了!
博主太厉害了!
真好呢
畅玩147刀塔传奇私服,尽享超值福利盛宴!:https://501h.com/yuanshi/2024-07-31/24638.html
传奇私服中物品价格如何设定才合理?:https://501h.com/fugu/2024-09-08/33800.html
解决玩传奇私服装备不显示问题,畅快游戏新体验!:https://501h.com/jinbi/20160.html