$data = array('corpid'=>'aaa','corpsecret'=>'bbb');
$url = "https://qyapi.weixin.qq.com/cgi-bin/gettoken";
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($data));
$html = curl_exec($ch);
echo $html;