Big Brother GPS Write/Read Page by angelone
This PHP script can be used to post Data from BBG to a mysql Database and read it from there.
It resolves the geocoordinates and writes the decoded data back to the database.
You can get Big Brother GPS from here: https://play.google.com/store/apps/details?id=org.gnarf.bigbrother.gps
The Database has to be created like this:
CREATE TABLE IF NOT EXISTS `gps` (
`timestamp` varchar(15) NOT NULL,
`latitude` varchar(50) NOT NULL,
`longitude` varchar(50) NOT NULL,
`accuracy` varchar(50) NOT NULL,
`provider` varchar(10) NOT NULL,
`altitude` varchar(20) NOT NULL,
`bearing` varchar(20) NOT NULL,
`speed` varchar(20) NOT NULL,
`sattime` varchar(50) NOT NULL,
`battlevel` varchar(5) NOT NULL,
`charging` varchar(5) NOT NULL,
`deviceid` varchar(50) NOT NULL,
`subscriberid` varchar(50) NOT NULL,
`klartext` varchar(200) NOT NULL,
`request` longtext NOT NULL,
PRIMARY KEY (`timestamp`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
Then, you have to input the mysql userdata into the variables at the beginning of the script in read.php and write.php
Usually you just have to change the user, password and database variables.
Plain resolving of coordinates to addresses can be done without a Google API key in batches of 10 requests per time.
Just refresh the read page a few times until all records are resolved.
If you want to use more then geocoding, you have to get an Google API key.
All API methods are included in the GoogleMap.php file.
For added security you can place the read.php inside a folder with htpasswd auth.
The App justs needs access to the write.php which is a standalone file that can be placed everywhere.
My Folder structure looks like this:
In the app you enter http://www.yoururl.com/write.php as post URL and tick all boxes, so that all available information gets posted.