Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Demonstration of how to use the Google Latitude API with PHP (CLI)
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
README
auth.php
config.php
currentLocation.php

README

README
======

Requirements
------------
 - PHP >= 5.2.0 (http://php.net/)
 - Zend OAuth libraries (http://framework.zend.com/)


Registering Your Application
----------------------------
 - Go to http://code.google.com/apis/accounts/docs/RegistrationForWebAppsAuto.html
 - Register your application
 - Edit config.php to provide your CONSUMER_KEY and CONSUMER_SECRET
 - Save the changes


Authorising your Application
-----------------_----------
 - open a terminal window
 - run 'php auth.php'
 - Your browser should open and you will be prompted to authorise the application
 - When you receive the authorisation token paste it back into the terminal window
 - You should then be returned to the command prompt
 - You will notice a new file: token.txt. This contains your auth token


Getting your current location
-----------------------------
 - open a terminal window
 - run 'php currentLocation.php'
Something went wrong with that request. Please try again.