GithubHelp home page GithubHelp logo

steenhansen / php-google-api-example Goto Github PK

View Code? Open in Web Editor NEW
2.0 3.0 2.0 7.82 MB

Deprecated - Read/write from/to Google Sheets and read from Google Docs with PHP.

PHP 92.99% CSS 0.29% JavaScript 2.47% HTML 1.24% Shell 1.07% Batchfile 0.01% Makefile 0.01% Dockerfile 0.01% Python 0.01% MoonScript 0.01% SCSS 1.30% XSLT 0.15% M4 0.01% C 0.21% Twig 0.20% Ruby 0.03% PowerShell 0.01% Procfile 0.01%
php google-docs google-sheets heroku

php-google-api-example's Introduction

This code does not work anymore. And https://google-api-example.herokuapp.com has been terminated.

When this program was first developed, websites did not need to go through an approval process to grant read/write access to password protected Google Docs and sheets. An updating Heroku server caused the Google credentials to be invalidated.

Basically, a PHP site used to use a Google spreadsheet to authorize who could log into a PHP program, and what system rights the user has access to.

For instance, [email protected], can log in and view general information. He can also view the 'Docs Manual' whereas [email protected] cannot.

The PHP program could change the values in the Google spreadsheet, so as to delete or change a user's name. But the PHP program would never know any passwords.

Google API calls Example in PHP:

Access live example

Automatically sign in with 'guest_account' of [email protected]
https://google-api-example.herokuapp.com/guestSignIn.php

Explanations and links to Google doc and sheet used
https://google-api-example.herokuapp.com/index.html

Sign in with a "real" Google account that exists in the Google sheet of users
https://google-api-example.herokuapp.com/login.php

Sign in via URL
https://google-api-example.herokuapp.com/[email protected]

The locked but visible Google sheet https://docs.google.com/spreadsheets/d/1vhce-ziBi6wneqJrxd7Zhyqth8ZLHMJHot1wxgK_T7k/edit#gid=0 that is read and written to.

visual explanation

Information

Sheet/Document/Email/Authorization Classes

php-google-api-example/Google_Api/

To install composer libraries

php-google-api-example/ composer install

To enable Google credentials

Copy google-sample files to google-account directory

To test

php-google-api-example/  php tests/call_tests.php   

php-google-api-example's People

Contributors

steenhansen avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.