<?php
$params = array(
'client_id' => '782016323201-ktsn3pteacteii6958sr2u0f13fj4441.apps.googleusercontent.com',
'redirect_uri' => 'https://test-server.tsecret.net/AUTH-2/WithGoogle.php',
'response_type' => 'code',
'scope' => 'https://www.googleapis.com/auth/userinfo.email https://www.googleapis.com/auth/userinfo.profile',
'state' => '001'
);
$url = 'http://accounts.google.com/o/oauth2/auth?' . urldecode(http_build_query($params));
header('Location: '.$url.'');
?>