Php openid验证返回false

Php openid验证返回false,php,openid,lightopenid,Php,Openid,Lightopenid,我已经下载了LightOpenIDhttp://gitorious.org/lightopenid 但几天前它停止了。我的代码: <?php require 'openid.php'; try { if(!isset($_GET['openid_mode'])) { if(isset($_GET['login'])) { $openid = new LightOpenID('my-domain.com'); $openid->identity

我已经下载了LightOpenIDhttp://gitorious.org/lightopenid 但几天前它停止了。我的代码:

<?php
require 'openid.php';
try {
if(!isset($_GET['openid_mode'])) {
    if(isset($_GET['login'])) {
        $openid = new LightOpenID('my-domain.com');
        $openid->identity = 'https://www.google.com/accounts/o8/id';
            $openid->required = array('namePerson/friendly', 'contact/email');
        header('Location: ' . $openid->authUrl());
    }
?>
<form action="?login" method="post">
<button>Login with Google</button>
</form>
<?php
} elseif($_GET['openid_mode'] == 'cancel') {
    echo 'User has canceled authentication!';
} else {
    $openid = new LightOpenID('my-domain.com');
    echo 'User ' . ($openid->validate() ? $openid->identity . ' has ' : 'has not ') . 'logged in.';
}
} catch(ErrorException $e) {
echo $e->getMessage();
}
echo '<pre>'.print_r($openid,true).'</pre>';
?>
它在本地主机上工作,但在web服务器上不工作


编辑:我找到了旧版本的LightOpenID,它可以正常工作。

请求流方法中有一个问题,我通过注释第352行并用return$data替换它来解决它


检查web服务器上与curl相关的设置。可能是[这个问题][1]。[1]:
//return file_get_contents($url, false, $context);
return $data;