제가 이해한 네이버 Syndicate API 란
구글 sitemap 과 비슷하게 유저가 검색엔진에 자기 콘텐츠를 알리고,
로봇이 다시 크롤링해서 결과를 받아가는 시스템입니다.

즉 프로세스가
1. 유저 -> 검색엔진 요청
2. 검색엔진 -> 유저의 웹서버 조회
3. 웹서버 출력 -> 검색엔진 DB에 반영

http://dev.naver.com/openapi/apis/function/syndication

간단하게 테스트를 하자면

<?
$api_url = 'http://syndication.openapi.naver.com/ping';

$syndi_url = 'http://www.totalcoupon.co.kr/syndi/syndi_echo.php';
$domain = 'www.totalcoupon.co.kr';
$s = "$syndi_url?id=tag:$domain,2011:site&type=site";
$s = 'link='.$s;

$header = "POST /ping/ HTTP/1.0\r\nUser-Agent: Mozilla/4.0 (compatible; NaverBot/1.0; http://help.naver.com/customer_webtxt_02.jsp)\r\nHost: syndication.openapi.naver.com\r\nContent-Type: application/x-www-form-urlencoded\r\n\r\n".$s."\r\n";

echo $header;
//exit;
$fp = fsockopen('syndication.openapi.naver.com', '80', $errno, $errstr, 5);
$ret = '';
if($fp){
fputs($fp, $header);
while ($line = fgets($fp)) $ret .= $line;
fclose($fp);
}
echo $ret;
?>

대충 이렇게 하면 되고요

http://syndication.openapi.naver.com/status/?site=www.totalcoupon.co.kr

반영이 되면 여기에 error 값 0 이 나오고 standby 상태가 될꺼에요.
2011/06/09 04:47 2011/06/09 04:47

Trackback Address :: https://youngsam.net/trackback/1479