Skip to content

Instantly share code, notes, and snippets.

View sonyarianto's full-sized avatar
🙏
Keep learning, stay relevant, relevancy increases value.

Sony AK sonyarianto

🙏
Keep learning, stay relevant, relevancy increases value.
View GitHub Profile
@Jerry0022
Jerry0022 / PHP Google oAuth2.php
Last active February 27, 2021 22:37
Google oAuth2, sign up, sign in, logout and show user data. Need to set REDIRECT_URL from google developer console and the https://github.com/google/google-api-php-client cloned in the web directory.
<?php
// Enable error reporting
error_reporting(E_ALL);
ini_set('display_errors', 1);
$google_redirect_url = 'REDIRECT_URL';
//start session
session_start();