HRD & Log4om web logbook scripting

I would like to share my PHP scripting that I am currently using with my Ham Radio and Log4om logbooks.
My logs are directly uploaded from the Ham Radio or Log4om Logbook to a MySQL database on my server.

How to install a MySQL data base, Mike WA9PIE has made a good video explaining how.

With my script it is possible to read out a local or remote SQL database.

The script reads out the database and is listed directly on a page.
You can also search for callsings, and partially like i.e. “hb9” or “2rt”

The files can be downloaded here.



v1.30b - Made compatible with Log4om MySQL logbooks
Minor fixes

v1.22 -Added QRA calculation
-Rearranged Rows Time, Date, Year, Flag
-Changed and added LOTW icon's corrensponding to its status.
-Added hover text on Callsign and LOTW
-Added Back button on search page.
-Added Expand view button for viewing fullsize when using iframe or on mobiles.


The zip file cointains the following editable files:

a style sheet “logbook.css”

The Style sheet contains all formatting of the whole logbook page, it is tweakable in any way you like.

Let’s take a look at “index.php” file:

$db_host = "hostname" ; // Hostname
$db_port = "3306" ; // Port, if set to 0 it will connect to localhost, it will override $db_host
$db_user = 'mysqlusername'; // MySQL Username
$db_pass = 'mysqlpassword'; // MySQL Password
$db_name = 'mysqldatabase' ; // MySQL Database
$db_pagetitle = 'Online Logbook'; // Page title
$db_booktitle = 'Digimode Logbook'; // Logbook Title
$db_typetitle = 'HF, VHF & UHF Digimode QSOs'; // Logbook content info
$station_call = 'YOURCALL'; // Station Callsign
$satellite = false ; // True or False, If this is a satellite logbook
$results_per_page = 250; // number of results per page
$logbook_type = 1 ; // 1 = HRD, 2 = Log4om

$results_per_page = 200; // number of results per page


$db_host = "hostname"
Here you can enter a url or ip adress of the server that holds the database

$db_port = "3306"
This is the MySQL TCP port, mostly port 3306 is used.
If you enter a value of “0”, then $db_host is overidden and the script connects to the “localhost”
This is mostly used when running the script (website) and MySQL logbook on the same server.

$db_user = "username"
Enter your MySQL username

$db_password = "password"
Enter your MySQL password

$db_name = "mysql-database-name"
Here you can enter the name of your HRD MySQL database.

$db_pagetitle = 'Online Logbook'
This will show ‘Online Logbook’ as the webpage title.

$db_booktitle = 'Digimode Logbook'
Here you can enter the logbook name, it it will show up centered on top of the logbook.

$db_typetitle = 'HF, VHF & UHF Digimode QSOs'
Here you can enter what kind of qso’s are logged in this logbook.

$station_call = 'YOURCALL'
Enter your callsign used with the logbook.

$satellite = false ; // True or False, True if this is a satellite logbook
If you set this to True or False a row is added in the table called “SATELLITE”

$logbook_type = 1
Enter 1 for Hamradio Deluxe logbook
Enter 2 for Log4om logbook

$results_per_page = 250
Here you can set the maximum logs per page.


Example of logbook

Do you like my projects and want to support me?