17 lines
425 B
PHP
17 lines
425 B
PHP
<?php
|
|
session_start();
|
|
|
|
require_once 'config/google.php';
|
|
|
|
$auth_url = 'https://accounts.google.com/o/oauth2/v2/auth?' . http_build_query([
|
|
'client_id' => GOOGLE_CLIENT_ID,
|
|
'redirect_uri' => GOOGLE_REDIRECT_URI,
|
|
'response_type' => 'code',
|
|
'scope' => 'https://www.googleapis.com/auth/analytics.readonly',
|
|
'access_type' => 'offline',
|
|
'prompt' => 'consent'
|
|
]);
|
|
|
|
header('Location: ' . $auth_url);
|
|
exit();
|