'publish', 'content' => $content, 'to' => $to_user, ]; $ch = curl_init (); curl_setopt($ch, CURLOPT_URL, $push_api_url); curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_HEADER, 0); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_POSTFIELDS, $data); curl_setopt($ch, CURLOPT_HTTPHEADER, array('Expect:')); $res = curl_exec($ch); curl_close($ch); var_dump($res); } $ss = '{"code": 0,"msg": "已应战,请准备开始对战!","data": {"record_id": "11","user_id": "1000005","ref_user_id": "1000010"}}'; $ss = urlencode($ss); push1($ss,123); push1('测试1',123);