PHP Classes

File: google_get_code.php

Recommend this page to a friend!
  Classes of Jasenko Rakovic   Maratus PHP Backup Databases   google_get_code.php   Download  
File: google_get_code.php
Role: Example script
Content type: text/plain
Description: Example script
Class: Maratus PHP Backup Databases
Backup many types of database to multiple storages
Author: By
Last change: Update of google_get_code.php
Date: 2 months ago
Size: 392 bytes
 

Contents

Class file image Download
<?php

require 'vendor/autoload.php';

$client = new Google_Client();
$client->setClientId("");
$client->setClientSecret("");
$client->setRedirectUri('urn:ietf:wg:oauth:2.0:oob');
$client->setAccessType("offline");
$client->setApprovalPrompt("force");
$client->setScopes(array('https://www.googleapis.com/auth/drive'));


$authUrl = $client->createAuthUrl();

echo
"Auth URL:\n$authUrl\n\n";