채택완료
curl 으로 특정 url 수신할 때 header값을 등록하는 이유는??
curl으로 특정 데이타 수신할 때.. 아래와 같이 header array값으로 등록하면
header값을 수신하는데요
안해도 데이타는 수신되는데 하는 이유가 뭔지??
$headers = array(
"Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8",
"Accept-Encoding: gzip, deflate",
"Accept-Language:ko-KR,ko;q=0.9,en-US;q=0.8,en;q=0.7",
"Connection: keep-alive",
);
// 헤더는 수신
curl_setopt($ch, CURLOPT_HEADER, $headers);
|
답변 2개
채택된 답변
+20 포인트
답변을 작성하려면 로그인이 필요합니다.