Setup

The installation works similar as with most other PHP applications:

Step 1: Download and unpack

Download the ZIP file and put the contents to a folder on your PC. Now copy these files into a separate folder on your website. As an example we will use http://www.example.com/mylightningdetection in the following steps.

Step 2: Accessing the Installer

The installation script will help you when creating the configuration and subsequently set up the database. The URL would be http://www.example.com/mylightningdetection/install .

Step 2 a)

At first, the necessary data for the database and the blitzortung.org user data has to be set up. For this, the configuration file config.php has to be created and edited by yourself in the folder /mylightningdetection/config.php.

Step 2 b)

In the next the database connection will be tested and after that the necessary tables will be created. If no error messages appeared, then everything worked just fine!

Step 2 c)

Now follows a test run, in which the first data is imported from blitzortung.org. After that, you will see more information for the next steps..

Step 3: Setting up the data import

Of course, fetching data from blitzortung.org has to be done automatically in certain time intervals. You simply have to call the URL that is displayed during the installation process. In our example, this would be:

http://www.example.com/mylightningdetection/blitzortung.php?update&secret=12345abc

The Secret has to be the same value as configured in the file config.php (BO_UPDATE_SECRET). It will prevent, that anyone could initiate an update. Otherwise, it offers no security gain. If it is not defined in config.php, it doesn't have be present in the above url.

For polling the URL, there are the following possibilities:

  • On Windows, you have to create a task, which calls a program to retrieve the URL (maybe complicated to set up)
  • Linux user simply create a cronjob that calls the program wget.
  • The easiest way is to use the website cronjob.de . Just specify the URL – ready.

Instead of the retrieving the URL, the script can also be accessed directly via PHP (see Readme -> FAQ 5).

Set up the interval to about 5 Minutes, but it is also possible to use shorter intervals, for example every minute. In fact, the readout interval will be defined later in the configuration.

Step 4: Set the permissions

For the caching of images and maps you have to set the permissions for the cache folder and all subfolders! Linux geeks use the command

chmod -R 777 cache

Step 5: Installation of JpGraph

JpGraph is needed for creating the graphs. It can be downloaded here: http://jpgraph.net/download/

After unpacking the archive, you have to copy the contents of the folder src to the directory includes/jpgraph . You can omit the folders src/barcode, src/Examples and the files that begin with flag – they are not needed.

Step 6: Configuration

Now MyBlitzortung should be ready for usage. However, there are still various possibilities for setting up maps, import intervals, appearance, etc. Read more on the page "Configuration".

Ready!

The actual installation is finished! You can use MyBlitzortung at http://www.example.com/mylightningdetection .