1
1
# phpGPS
2
+
2
3
A php based webservice for GPS tracking with Google Maps integration
4
+
3
5
========
4
6
5
7
www.mikelduke.com
6
8
7
-
8
9
*******************************************************************************
9
10
A php based webservice for GPS tracking with Google Maps integration
10
11
@@ -17,8 +18,8 @@ https://developers.google.com/maps/documentation/embed/get-api-key
17
18
18
19
*******************************************************************************
19
20
20
-
21
21
## Features
22
+
22
23
* Stores gps coordinates in a MySQL database, generates xml, and draws markers on to a Google Maps map.
23
24
* Draw Paths on the map using the gps entries
24
25
* Paths can be colored
@@ -32,34 +33,58 @@ https://developers.google.com/maps/documentation/embed/get-api-key
32
33
* To embed on a webpage:
33
34
``` <iframe src="view.php" height="520" width="520" seamless></iframe> ```
34
35
35
- Example Update URL:
36
- 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
36
+ Example Update URL:
37
+ ` 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 `
38
+
39
+ *******************************************************************************
37
40
38
41
## Important Pages
42
+
39
43
* phpGPS_Settings.php - Settings File
40
44
* generateXML.php - Generates xml for use by google maps
41
45
* view.php - Displays the map with markers, embeddedable in an iframe
42
46
43
-
44
47
## Requirements
48
+
45
49
* php 5+
46
50
* MySQL
47
51
* Webserver
48
52
53
+ *******************************************************************************
49
54
50
55
## Install Instructions
56
+
51
57
1 . Extract php files to webhost
52
58
1 . Create Database for use by phpGPS
53
- 1 . Enter database settings and other config in phpGPS_Settings.php
59
+ 1 . Enter database settings and other config in phpGPS_Settings.php or set using environment variables
54
60
1 . Open phpGPS/install/install.php in browser to create the necessary tables
55
61
1 . Delete the install folder on webhost
56
62
1 . Login as user admin/admin and change the default admin pass
57
63
1 . Set up owners, devices, paths, etc as desired and start creating markers
58
64
59
- # Demo VM
65
+ ### Demo VM
66
+
60
67
Requires Vagrant + VM Provider like VirtualBox + Google Maps API Key
68
+
61
69
* Clone this repo and make sure .sh files use unix line endings LF
62
70
* Set API Key in phpGPS_Settings.php
63
71
* Run ``` vagrant up ```
64
- * Connect at http://localhost
72
+ * Connect at ` http://localhost `
73
+ * Login with user/password: admin/admin
74
+
75
+ *******************************************************************************
76
+
77
+ ## Development
78
+
79
+ Dockerfile and Docker-compose configs are included for easy setup on Linux/Mac. Windows + Docker is not as seamless.
80
+
81
+ Use ` docker-compose up ` to automatically load a basic mysql server and an apache+php server.
82
+ The application is mounted as a volume to allow for modifying php scripts without restarts.
83
+
84
+ * Install docker and docker-compose if not already present ` sudo apt install docker docker-compose `
85
+ * Clone this repo, ensure Unix line endings are used
86
+ * Set api key in shell ` export DEV_KEY=1234567890 `
87
+ * Launch with ` docker-compose up `
88
+ * Connect at ` http://localhost:8080 `
65
89
* Login with user/password: admin/admin
90
+ * Control+C or ` docker-compose down ` to stop
0 commit comments