本文整理汇总了PHP中getAccessTokenFromSession函数的典型用法代码示例。如果您正苦于以下问题:PHP getAccessTokenFromSession函数的具体用法?PHP getAccessTokenFromSession怎么用?PHP getAccessTokenFromSession使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了getAccessTokenFromSession函数的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: session_start
<?php
session_start();
require '../../vendor/autoload.php';
require_once '../helpers/variables.php';
require_once '../helpers/functions.php';
$token = getAccessTokenFromSession($provider);
$token_info = $provider->getTokenInfo($token);
?>
<html>
<head>
<title>Token Info</title>
</head>
<body>
<h2>Token Info</h2>
<ul>
<li>Token: <?php
echo $token_info->token;
?>
</li>
<li>Expired: <?php
echo $token_info->expired ? 'True' : 'False';
?>
</li>
<li>Expires In: <?php
echo $token_info->expires_in;
?>
</li>
示例2: session_start
<?php
session_start();
require '../../vendor/autoload.php';
require_once '../helpers/variables.php';
require_once '../helpers/functions.php';
$token = getAccessTokenFromSession();
if (isset($_GET['id'])) {
$id = $_GET['id'];
$filename = $id . '.tiff';
$save_path = getcwd() . '/' . $filename;
$incomingFax = $provider->getIncomingFax($token, $id, $save_path);
} else {
echo "I don't know the ID";
exit;
}
?>
<html>
<head>
<title>Incoming Fax - <?php
echo $_GET['id'];
?>
</title>
</head>
<body>
<?php
header('Content-type: image/tiff');
header('Content-Length: ' . filesize($save_path));
header('Content-Disposition: attachment; filename=' . $filename . '');
while (ob_get_level()) {