gmc_log.php is a PHP-based GMC Geiger Counter logger and viewer.
It accepts incoming device readings via HTTP GET, stores them in SQLite, and provides a browser UI with charts and export.
Licensed under AGPL-3.0-only.
-
Connect your GMC-500+ to WiFi.
-
Navigate to Menu -> Server -> Website.
-
Enter the URL for your server installation.
Example: Website:
192.168.1.100URL:gmc_log.php(Replace
192.168.1.100with your actual server IP or domain) -
Save and exit. The counter should begin sending readings.
- Logs incoming device data to
gmc_logs/gmc_readings.sqlite - Captures device ID, CPM, ACPM, µSv/h, dose, raw query payload, and client IP
- Shows a web dashboard with a readings table (latest first)
- Displays interactive charts with day/week/month/year tabs
- Supports export to CSV and XLSX
SQLite DB file:
gmc_logs/gmc_readings.sqlite
Table created automatically:
readings(id, timestamp, device_id, cpm, acpm, usv, dose, raw_data, client_ip)
The script auto-creates the DB folder and table if missing.
The script treats a request as a log write when any of these query params exists:
CPM,AID, orGID
Accepted input parameters (case-sensitive):
- Device ID:
AID - CPM:
CPM - ACPM:
ACPM - µSv/h:
uSV - Dose:
dose
Defaults when omitted:
device_id = UNKNOWNcpm = 0acpm = 0usv = 0.0dose = 0
On successful insert, response body is:
OK
Optional device whitelist:
- If
whitelist.txtexists in the same folder asgmc_log.php, only listed device IDs are accepted. - One device ID per line.
- Empty lines are ignored.
- Lines starting with
#are treated as comments. - Device matching is case-insensitive.
- If a device is not in whitelist, the logger returns HTTP
403with bodyFORBIDDEN.
Example whitelist.txt:
# Allowed devices
50389795
GMC-ALPHA-01On unhandled server error:
- HTTP
500 - response body
ERROR
Opening gmc_log.php without log params shows the dashboard.
Features:
- Last 50 rows shown (
MAX_VIEW_ROWS = 50) - Interactive chart with tabs for Last Day, Last Week, Last Month, Last Year
- Displays averaged CPM and ACPM over grouped time intervals
- Theme selection via
theme(default:dark):light,dark
- Theme preference is saved in
localStorage - Auto-refresh every 60 seconds
The viewer uses gmc_log.css for styling and Chart.js for charts.
Use query parameter:
export=csvorexport=xlsx
Exports include all stored readings (no row limit). Exported columns are: Timestamp, CPM, ACPM, µSv/h, and Dose.
Examples:
- CSV:
gmc_log.php?export=csv - XLSX:
gmc_log.php?export=xlsx
Sample device log request:
gmc_log.php?AID=50389795&CPM=10&ACPM=7.9&uSV=0.20
Then open:
gmc_log.php
to view data.