1
LightOpenID를 사용하여 데이터를 가져 오려고합니다. 있는 그대로, 아래 코드가 작동하지만 더 많은 정보를 얻기 위해 줄의 주석을 제거하면 시간이 초과되어 오류가 표시되지 않습니다. 내가 도대체 뭘 잘못하고있는 겁니까?openID에서 데이터 가져 오기
require_once('inc/func/_functions.php');
require ('inc/libs/openid.php');
initSession();
try {
$openid = new LightOpenID('tutordelphia.com');
if(!$openid->mode) {
$openid->identity = 'https://www.google.com/accounts/o8/id';
$openid->required = array (
'contact/email',
// 'namePerson/first',
// 'namePerson/last'
);
header('Location: ' . $openid->authUrl());
} elseif($openid->mode == 'cancel') {
echo 'User has canceled authentication!';
} else {
$valid=$openid->validate();
if($valid)
{
$data=$openid->getAttributes();
$_SESSION['user']=new userClass();
$_SESSION['user']->userID=$_GET['openid_identity'];
$_SESSION['user']->userEmail=$data['contact/email'];
// $_SESSION['user']->firstName=$data['namePerson/first'];
// $_SESSION['user']->lastName=$data['namePerson/last'];
// $_SESSION['user']->userName=$data['namePerson/first'].$data['namePerson/last'];
$_SESSION['user']->addUserToDB();
$_SESSION['user']->createUserCookie();
header('Location: index.php');
}
}
} catch(ErrorException $e) {
echo $e->getMessage();
}
내가 내 로컬 서버에 그것을 시도하고 일) 만 배치 할 때 작동하지 않습니다;
거기에서 라이브러리가 실제로 작동하는 경우 적어도 확인할 수 있습니다. 나는 phpInfo를 비교했다. 비뚤어 질 것입니까? – Zev