本文整理汇总了PHP中getAuthSubUrl函数的典型用法代码示例。如果您正苦于以下问题:PHP getAuthSubUrl函数的具体用法?PHP getAuthSubUrl怎么用?PHP getAuthSubUrl使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了getAuthSubUrl函数的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: requestUserLogin
/**
* Outputs a request to the user to login to their Google account, including
* a link to the AuthSub URL.
*
* Uses getAuthSubUrl() to get the URL which the user must visit to authenticate
*
* @return void
*/
function requestUserLogin($linkText)
{
$authSubUrl = getAuthSubUrl();
echo "<a href=\"{$authSubUrl}\">{$linkText}</a>";
}
示例2: getAuthSubUrl
$host = $_SERVER['HTTP_HOST'];
if ($_SERVER['SERVER_PORT'] != '' && ($protocol == 'http://' && $_SERVER['SERVER_PORT'] != '80' || $protocol == 'https://' && $_SERVER['SERVER_PORT'] != '443')) {
$port = ':' . $_SERVER['SERVER_PORT'];
} else {
$port = '';
}
return $protocol . $host . $port . $php_request_uri;
}
function getAuthSubUrl()
{
$next = getCurrentUrl();
$scope = 'http://picasaweb.google.com/data';
$secure = 0;
$session = 1;
return Zend_Gdata_AuthSub::getAuthSubTokenUri($next, $scope, $secure, $session);
}
?>
<div id="login-div" class="row">
<a id="login-link" class="btn btn-danger btn-lg" href="<?php
echo getAuthSubUrl();
?>
">
Google
</a>
</div>
</div>
</body>
</html>