아무에게도이 점을 지적 해 주시겠습니까? ?AuthSub을 사용하여 Google 연락처 데이터 가져 오기
<?php
if(!empty($_GET))
{
if(isset($_GET['token']))
{
$token = $_GET['token'];
$ch = curl_init('https://www.google.com/m8/feeds/');
if($ch)
{
curl_setopt
(
$ch,
CURLOPT_HTTPHEADER,
array
(
/* "Content-Type: application/x-www-form-urlencoded",*/
"Authorization: AuthSub token=\"{$token}\""
)
);
curl_setopt($ch,CURLOPT_RETURNTRANSFER,true);
//curl_setopt($ch,CURLOPT_FOLLOWLOCATION,true);
curl_setopt($ch,CURLOPT_SSL_VERIFYPEER,false);
curl_setopt($ch,CURLOPT_HTTPGET,true);
curl_setopt($ch,CURLOPT_HTTP_VERSION,CURL_HTTP_VERSION_1_1);
curl_setopt($ch,CURLOPT_HEADER,true);
//curl_setopt($ch,CURLOPT_POST,true);
$res = curl_exec($ch);
echo $res.'<br />';
}
}
}
>
그리고 이것은 Google에 사용자를 리디렉션을 사용하여 링크 메신저입니다 -
HTTP/1.1 400 Bad Request
콘텐츠 - -
그것은 저에게이주는 유지 유형 : text/html; charset = UTF-8 날짜 : 2010 년 11 월 28 일 09:59:53 GMT 만료 날짜 : 일요일, 28 11 월 2010 09:59:53 GMT 캐시 제어 : 개인, 최대 연령 = 0 X- 컨텐츠 -Type-Options : nosniff X- 프레임 옵션 : SAMEORIGIN X-XSS- 보호 : 1; 모드 = 블록 서버 : GSE 전송 - 인코딩 :
잘못된 요청 URI
어떤 생각 누구
청크? 내가 하나 개 이상의 장소에서 잘못된 메신저 알고 있지만, 내 머리는 거의 4 시간이 함께 노력하고 메신저로 작동하지 않는 : D감사합니다, ANJAN