dingtalk

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);

你可能感兴趣的:(http)