Giter Site home page Giter Site logo

glass-mirror-quickstart-php-sqlite3's Introduction

Google Mirror API's Quick Start for PHP using SQLite3

This has been modified by Tony Gaitatzis - http://www.linkedin.com/in/tonygaitatzis

The documentation for this quick start was modified from the code avaliable on developers.google.com. Please see here for more information: https://developers.google.com/glass/quickstart/php

Motivation behind this project

The motivation behind this project is that modern Linux distributions do not support SQLite2, which is coded into Google's demo code for PHP/Glassware. This results in the error:

PHP Fatal error: Call to undefined function sqlite_fetch_single() in util.php on line 61

In addition, the Google implementation handles data structures as arrays, but attempts to treat them as objects, causing the following error:

PHP Fatal error: Call to a member function getItems() on a non-object in index.php on line 145

I've modified util.php to support SQLite3, and modified google-api-php-client/config.php to support object data structures, resolving both these issues.

Configuration:

$api_client_id = "YOUR_API_CLIENT_ID";
$api_client_secret = "YOUR_CLIENT_SECRET"; $api_simple_key = "YOUR_SIMPLE_KEY"; $base_url = "YOUR_URL"; // e.g. "https://example.com/glasswarename" $sqlite_database = "YOUR_DATABASE"; // e.g. "/var/db/glasswarename.sqlite" - make sure it's writeable

If your webpage prints out all the information successfully, congratulations! You may now use this to develop your own glassware app

glass-mirror-quickstart-php-sqlite3's People

Contributors

backupbrain avatar

Watchers

James Cloos 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.