<?php $url='http://dingtalk.XXX.com/test'; $str="to=1&content=你好"; // http_build_query(arr) $opt = array( 'http'=>array( 'method'=>"POST", 'header'=>"Content-Type: application/x-www-form-urlencoded\r\n" . "Cookie: token=**********************\r\n". "User-Agent: **********\r\n". "Content-Length:".strlen($str)."\r\n", 'content' =>$str ) ); $context = stream_context_create($opt); $res = file_get_contents($url,false,$context);
dingtalk
最新推荐文章于 2024-08-07 15:21:08 发布