Instructions | View log | Send data ... |
---|
How to set up the server side for Big Brother GPS.
This involves a log file and four scripts:
positions-test.log
bbg_const_test.php
:
defines some global constants
bbg_view_test.php
:
script to view the log file
bbg_recv_test.php
:
script to handle a POST and
append data to the log file;
invoked by phone or send script (next item);
not accessed directly by user
bbg_send_test.php
:
script to manually test the POST handler;
it mimicks what the phone does
Steps:
positions-test.log
to the log directory,
and change its permissions to make it
readable and writable for the PHP scripts.
This file contains one line of sample data in CSV format.
bbg_const_test.php
to adjust the $logdir
variable
to point to the log directory on your server.
This is an absolute path to that directory,
ending in /
.
bbg_view_test.php
.
bbg_send_test.php
.
This invokes the script bbg_recv_test.php
.
Check the result via
bbg_view_test.php
.
bbg_recv_test.php
.
This URL typically looks like
http://www.some.where/.../bbg//bbg_recv_test.php
.
bbg_recv_test.php
.
Check the result via
bbg_view_test.php
.
In particular,
check that the secret data field was logged.bbg_const_test.php
.
If this all works, you are ready to move to the production set up.