Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- class gstorage {
- private $_client;
- private $_storage;
- public function __construct() {
- $scopes = implode(' ', array(
- Google_Service_Storage::DEVSTORAGE_READ_WRITE,
- ));
- $this->_client = new Google_Client();
- $jsonAuth = file_get_contents("<FILENAME TO AUTH.JSON>");
- $this->_client->setAuthConfig(json_decode($jsonAuth, true));
- $this->_client->setScopes($scopes);
- $this->_storage = new Google_Service_Storage( $this->_client );
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement