| Server IP : 104.21.37.246 / Your IP : 104.23.243.32 [ Web Server : Apache System : Linux cpanel01wh.bkk1.cloud.z.com 2.6.32-954.3.5.lve1.4.59.el6.x86_64 #1 SMP Thu Dec 6 05:11:00 EST 2018 x86_64 User : cp648411 ( 1354) PHP Version : 7.2.34 Disable Function : NONE Domains : 0 Domains MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /home2/cp648411/public_html/kainumber.com/loginline/ |
Upload File : |
<?php
session_start();
include('LineLogin.php');
$line = new LineLogin();
$get = $_GET;
$code = $_GET['code'];
$state = $_GET['state'];
$token = $line->token($code, $state);
echo "<pre>";
print_r($token);
echo "</pre>";
/*
*/
if (property_exists($token, 'error'))
header('location: index.php');
if ($token->id_token) {
$profile = $line->profileFormIdToken($token);
$_SESSION['profile'] = $profile;
$_SESSION['line_pic'] = $profile->picture;
$_SESSION['line_name'] = $profile->name;
$_SESSION['line_email'] = $profile->email;
header('location: ajax_line.php');
//print_r($profile);
}
## get profile by token
// $profile2 = $line->profile($token->access_token);
// print_r($profile2);