Code Monkey home page Code Monkey logo

airport-departure-board's Introduction

Airport departure board

alt text

This was made to run on a system with Apache and PHP. I used php 8 and linux but should run with other options. Good results have also been reported with lighhttpd and php 7.3. Ensure you have php-curl installed (see here how to install it: https://stackoverflow.com/questions/6382539/call-to-undefined-function-curl-init)

Don´t forget to get your https://airlabs.co/ API key and insert it in api.php.

Free version of API requests limit per month is 1000 but you can request double that by email (the procedure is explained on the automated email you receive upon registration). With 2000 requests per month you have to control yourself: in the worst case scenario (which is a 31-day month) you can only make 64 requests per day or 2 requests per hour or 1 request every 30 minutes.

Once you copy these files to your root folder, you can go to base.php and something should show up.

You can set the number of rows that show up on the arrivals and departures lists at the top of the base.php file. This will allow you to set the results list to the size of your screen.

The selection of the airport on the settings file is not done yet. Feel free to fork this repository and do it for the community, me included. Additional comments by contributor https://github.com/corbelr after his amazing contribution to the project:

--START This is a reminder for users who want to install 'Airport Departure Board' (by Ruy Alves) on their computer. The code you'll find on this fork is an evolution, many features have been added. NOTE : this code does NOT work on a computer that runs Lighttpd 1.4/PHP 7.4. Use Apache 2/PHP 7.4 for best results.

Feel free to report bugs and submit a new version with new features - you can do that here and/ or at corbelr's repository.

Since the Apache 2 process runs under 'www-data' identity, it is necessary to change owner/group of the directory (let's say 'adb') which contains the code. You do this in a terminal like this : cd /var/www/html sudo chown -R www-data:www-data ./adb This allows the settings.php page to modify the 'settings' file to reflect the airport chosen by the user. If the 'settings' file were owned by root, it would be impossible for the Apache 2 process to update this file.

It is a good idea, for those who want to work on the code locally, to put their normal user (pi) in the www-data group. Just do this in a terminal : sudo usermod -a -G www-data pi Close the session, then re-open it.

Have fun ! --END

see here for more information: https://supertechman.blogspot.com/2022/06/raspberry-pi-based-airport-arrivals-and.html

airport-departure-board's People

Contributors

0ruialvel0 avatar corbelr avatar ftonioli avatar ruialves avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

airport-departure-board's Issues

support to run on terminal

Is it possible to run it on a terminal like i run it and it just displays the flight details in the linux terminal?

No data coming in, everything seems fine.

I am new to this type of project and feel that I missed something simple, but I don't know what I don't know.

I followed the instructions and feel that everything is set up correctly, but I see no data populate my departure board when I navigate to base.php. The airport I selected is correctly displayed, only no flights.

  • I have the api key and confirmed it works (with the 2k/month limit) with airlabs. The api key is in api.php
  • The usage tab at airlabs shows queries have been made
  • The error.log only shows restarts of Apache2
  • Ownership of www-data has been changed and the airport I selected appears on the website for the program (following the README directions)
  • My normal user is in www-data (following the README directions)

I would greatly appreciate any help troubleshooting this.

When changing settings to a different airport one is not redirected to base.php

In the settings.php file the

Set Airport <input type="button" onclick=location.href"='base.php';" value=" Cancel " />

Does not redirect user back to the base.php screen.

So you will see an output as follows:

Choose an airport
Airport to find : VHHH
Airport found !

But then you are stuck at the screen.

I am running on Debian 12 (bookworm). with apache2 2.4.57 and php 8.2

no flight info

Hey!

noticed a closed ticket about curl, but I have it enabled?

my site : http doesn't seem to show any departures?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.