Display JSON API Installation Guide
===================================

This guide explains how to install display-json.php on a Raspberry Pi and make it available through the web server for SVXLink.

Installation
------------

1. Copy the PHP file to the Raspberry Pi

Using WinSCP or another SFTP client, copy the file:

display-json.php

to the Raspberry Pi folder:
/home/pi

After copying, the file should be located here:
/home/pi/display-json.php


2. Create the API folder

Open a terminal or SSH session on the Raspberry Pi and run:

cd /var/www/html
sudo mkdir api

This creates a new folder:
/var/www/html/api


3. Copy the PHP file into the API folder

Run the following command:
sudo cp /home/pi/display-json.php /var/www/html/api

The file should now be available at:
/var/www/html/api/display-json.php


Full Install Commands
---------------------

cd /var/www/html
sudo mkdir api
sudo cp /home/pi/display-json.php /var/www/html/api


Accessing the API
-----------------

After installation, the PHP file can usually be opened in a browser using:
http://<raspberry-pi-ip>/api/display-json.php

Replace <raspberry-pi-ip> with the IP address of your Raspberry Pi.

Example:
http://192.168.1.50/api/display-json.php


Notes
-----

If the api folder already exists, the mkdir command may show an error. In that case, you can use:
sudo mkdir -p /var/www/html/api

To verify that the file was copied successfully, run:
ls -l /var/www/html/api
