4,250
社区成员
发帖
与我相关
我的任务
分享 $file = array("audio"=>"@E:/POSTSTREAM/s.amr");//文件路径,前面要加@,表明是文件上传.
$curl = curl_init("http://xxx.xxx.xxx.xxx:xxx/ddppls/PostStream.aspx?pack={1411}{615044}{7348}{534310}");
curl_setopt($curl, CURLOPT_HEADER, 0);
curl_setopt($curl,CURLOPT_POST,1);
curl_setopt($curl,CURLOPT_POSTFIELDS,$file);
$response= curl_exec($curl);
curl_close($curl);
$data = file_get_contents ( 'php://input' );
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "http://xxx.xxx.xxx.xxx:xxx/ddppls/PostStream.aspx?pack={1411}{615044}{7348}{534310}");
curl_setopt($ch, CURLOPT_HEADER, 1);
curl_setopt($ch , CURLOPT_POST , 1);
curl_setopt($ch , CURLOPT_POSTFIELDS , $data);
$response=curl_exec($ch);
curl_close($ch);