Giter Site home page Giter Site logo

mikelduke / phpgps Goto Github PK

View Code? Open in Web Editor NEW
66.0 12.0 96.0 46 KB

A php based webservice for GPS tracking with Google Maps integration

License: GNU General Public License v2.0

PHP 95.70% JavaScript 2.72% Shell 0.89% Dockerfile 0.67% Hack 0.02%

phpgps's Introduction

phpGPS

A php based webservice for GPS tracking with Google Maps integration

========

www.mikelduke.com


A php based webservice for GPS tracking with Google Maps integration

Uses Bootstrap to display the Admin pages: http://getbootstrap.com/

Get a Google Maps API Key: https://developers.google.com/maps/signup https://developers.google.com/maps/documentation/embed/get-api-key


Features

  • Stores gps coordinates in a MySQL database, generates xml, and draws markers on to a Google Maps map.
  • Draw Paths on the map using the gps entries
  • Paths can be colored
  • Entries can be linked to paths, to a device, and a device to an owner
  • Multiple gps entry types with custom icons
  • Edit markers on the map view by dragging to new locations
  • Shows marker name and comment in small dialog on map view
  • Can have multiple users to admin the system
  • Users can easily add new gps points either through the admin interface or using any external client capable of making HTTP GET requests.
  • On Android, it is simple to create a task using the app Tasker to generate the requests as desired.
  • To embed on a webpage: <iframe src="view.php" height="520" width="520" seamless></iframe>

Example Update URL:
http://yoursite.com/phpGPS/addGpsEntry.php?key=1234&newEntry=Y&gps_devicename=DeviceID&gps_type_id=1&gps_path_id=1&gps_date_dt=11-13-2014&gps_date_time=22.31&gps_status=&gps_latitude=32&gps_longitude=-96&gps_altitude=160.0&gps_accuracy=57&gps_name=test%20spot&gps_comment=test%20comment&gps_address1=address%201&gps_address2=address%202&gps_address3=address%203&gps_city=city&gps_zipcode=567567&gps_state=state&gps_country=country


Important Pages

  • phpGPS_Settings.php - Settings File
  • generateXML.php - Generates xml for use by google maps
  • view.php - Displays the map with markers, embeddedable in an iframe

Requirements

  • php 5+
  • MySQL
  • Webserver

Install Instructions

  1. Extract php files to webhost
  2. Create Database for use by phpGPS
  3. Enter database settings and other config in phpGPS_Settings.php or set using environment variables
  4. Open phpGPS/install/install.php in browser to create the necessary tables
  5. Delete the install folder on webhost
  6. Login as user admin/admin and change the default admin pass
  7. Set up owners, devices, paths, etc as desired and start creating markers

Demo VM

Requires Vagrant + VM Provider like VirtualBox + Google Maps API Key

  • Clone this repo and make sure .sh files use unix line endings LF
  • Set API Key in phpGPS_Settings.php
  • Run vagrant up
  • Connect at http://localhost
  • Login with user/password: admin/admin

Development

Dockerfile and Docker-compose configs are included for easy setup on Linux/Mac. Windows + Docker is not as seamless.

Use docker-compose up to automatically load a basic mysql server and an apache+php server. The application is mounted as a volume to allow for modifying php scripts without restarts.

  • Install docker and docker-compose if not already present sudo apt install docker docker-compose
  • Clone this repo, ensure Unix line endings are used
  • Set api key in shell export DEV_KEY=1234567890
  • Launch with docker-compose up
  • Connect at http://localhost:8080
  • Login with user/password: admin/admin
  • Control+C or docker-compose down to stop

phpgps's People

Contributors

mikelduke avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

phpgps's Issues

OpenStreetMaps Support

I really liked your project and have been implementing it on my website.

Have you ever thought of adding OpenStreetMaps support to phpGPS?

Thank you for your great work!

geofence

thank you sir for greate work , can you please add option about geofence , that can user draw it and trigger them device when enter/leaves geofence . thank you

Need help

Hi

I am beginner to php and mysql. I have installed you phpGPS project on my system. I am able to create the back-end that is install.php. After this I cant figure out the flow and how to go about it to completely implement this . Kindly brief me about this ASAP.

Thanks,

Custom Fields Support

I want to monitor some custom data like:

  • Battery Percentage,
  • Battery Temperature,
  • Device IP Address,
  • Device Name,
  • Device Manufacturer,
  • Cell ID,
  • Speed,
  • Altitude,
  • Device Uptime,
  • Available Storage,
  • etc...

How do I add them?

Role of visual box

I tried to run this program but i don't know about the virtual box and vagrant can anyone tell me why it is used and how.

Does not work

I try to install your proect, but nothing works, the install.php is ok, but after , only a menu is showed, but nothing work any options.

Application Not working

Hi,
I have installed all the required pre requisites and packages from the code.
the sql part worked fine.
but after logging in, i can only see the top part of the menu.
Is there anything missing here.
Please help as I am totally new to PHP and Mysql.
And it has taken a lot of installation / uninstallation to get this website running.
capture

Thanks so much.

errors

Warning: mysqli_connect(): php_network_getaddresses: getaddrinfo failed: No such host is known. in C:\xampp\htdocs\phpGPS-master\src\phpGPS.php on line 34

Warning: mysqli_connect(): (HY000/2002): php_network_getaddresses: getaddrinfo failed: No such host is known. in C:\xampp\htdocs\phpGPS-master\src\phpGPS.php on line 34
Failed to connect to db: 2002Error connecting to user system

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.