Setting up GPS
A simple USB GPS receiver will do just fine for this project. I'm using an old Microsoft USB GPS. In order for the Pi to read the GPS data we'll install gpsd.
sudo apt-get install gpsd gpsd-clients
Setting up the local web server
The main PHP script will read the gpsd information through a JSON file. We'll need to install apache and PHP to serve the JSON file locally.
sudo apt-get install apache2 -yDrop this file from the gpsd project into the web server directory, /var/www/ and name it gpsd.php
sudo apt-get install php5 libapache2-mod-php5 -y
Execute gpsd.php from the command line to build a needed configuration file.
cd /var/wwwIf you open a web browser on your Pi and navigate to http://localhost/gpsd.php?
sudo php gpsd.php