You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
28 lines
828 B
PHP
28 lines
828 B
PHP
<?php
|
|
$url = "https://dqgatjzx-wx.sixinyun.com/PEISCommon/OODD_GetOccInfo/130209000001";
|
|
$jsonData = file_get_contents('php://input');
|
|
//$data = json_decode($jsonData, true);
|
|
$data=post($url,$jsonData);
|
|
|
|
echo $data;
|
|
|
|
function post($url, $data_string,$or_str='')
|
|
{
|
|
$curl = curl_init();
|
|
curl_setopt($curl, CURLOPT_URL, $url);
|
|
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
|
|
curl_setopt($curl, CURLOPT_POST, true);
|
|
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);
|
|
curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, false);
|
|
curl_setopt($curl, CURLOPT_HTTPHEADER, [
|
|
'Content-Type: application/json; charset=utf-8',
|
|
'Content-Length: ' . strlen($data_string)
|
|
]);
|
|
curl_setopt($curl, CURLOPT_POSTFIELDS, $data_string);
|
|
$r = curl_exec($curl);
|
|
curl_close($curl);
|
|
|
|
|
|
|
|
return $r;
|
|
} |