$url = "https://cp.news.search.daum.net/api/feed.json?orgid=".$news_checked[$i];
$opts = array(
'http'=>array(
'method'=>"POST",
'header'=>"Accept: application/json\r\n".
"Content-type: application/xml; charset=utf-8\r\n".
"Api-Key: qSV3RB54JIOIPRSs1YNVEYU5",
"content" => "$postData"
)
);
$context = stream_context_create($opts);
$resp = file_get_contents($url, FALSE, $context);
$jdata=json_decode($resp);
//print_r($resp);
///////////////////////////////////////////////////////////////////////////////////////
if($jdata->feedResult->result=="OK") {
echo "전송 성공 ";
}
삭제는
'method'=>"POST", 이것을 'method'=>"DELETE",
로 변경 하면 된다.
|