Hey, I noticed that the “demand” for this thing seems to be quite “high”.
I created a tool that pulls data from flightaware’s api and stores them into a csv file which phpvms can accept
There is still plenty to do (I need to add so you can quickly change airline to pull data from).
You need to create an account at fligthtaware and then change the variables in the index.php file, then you’re good to go!
How does it work? Well, unlike some other services, it doesn’t use AirlineFlightSchedules query in the api since that is a paid service, we want to keep it completely free.
It uses AirportBoards and then adds the parameter of only including the airline you want and then takes the data which is looked after (airline code, flightnumber, tailnumber etc) and prints them out into tables and into one big csv file. It takes only arriving and departing aircrafts, since when doing scheduled ones, missing info was inserted.
Since it’s using AirportBoards, that means that you have to run this script every day for a week on all the hubs (don’t worry, you can change which airport to capture data from) to capture all the data.
You can check and contribute to the project at my github
Next update will check if there is a route filed and print that to the table and csv file. Possibly going to add the same thing for the altitude, but I am not sure if I should to it flight level or just pure altitude. Maybe I’ll integrate a checkbox for that
You don’t install it on phpvms (although you can, but I am not going to sit and write a tutorial on that :p), you run it and get a schedule.csv which you can import to phpvms.
Right now, it doesn’t get all the schedules, you need to run at a couple of times and whatnot but I am working on it
Been a long time since I looked at FlightAware. Their new pricing structure looks a lot more reasonable than what they had last time. Have you considered doing a chron job to get the schedules for the most popular airlines?
Been a long time since I looked at FlightAware. Their new pricing structure looks a lot more reasonable than what they had last time. Have you considered doing a chron job to get the schedules for the most popular airlines?
I have considered it, but it’s not the best solution (if a code already exists, it’s going to append it twice which isn’t good).
$code is defined by whatever you want ( WJA-JBU-AAL-DAL…)
The script is connected directly with your phpvms database so it updates/upload all datas in there.
If flight does not exist = it creates
If flight exist = check for update
if exist and up to date = do nothing
and also, if flight do not receive any update for x days, then delete it
So you understand here that my schedule is always up to date and synchroinized with flightaware
I’m pretty proud of it because i’m not a php expert and I’m working on it for one year lol
I used flightaware API before but I found out a way to get data for free…
$code is defined by whatever you want ( WJA-JBU-AAL-DAL…)
The script is connected directly with your phpvms database so it updates/upload all datas in there.
If flight does not exist = it creates
If flight exist = check for update
if exist and up to date = do nothing
and also, if flight do not receive any update for x days, then delete it
So you understand here that my schedule is always up to date and synchroinized with flightaware
I’m pretty proud of it because i’m not a php expert and I’m working on it for one year lol
I used flightaware API before but I found out a way to get data for free…
Looks and sounds awesome! I see what you did there without using the api (I’m not even mad that’s impressive).
This is just a project I did to learn to work with api’s and curl in php, but it’s pretty cool what you can do!
Here a code I have written long time ago and I do not use anymore. not sure if it still working
Quickly skimmed through it, afaik, flightxml2 is deprecated But hey! Conversion to flightxm3 is possible Just a bit curious how using “w” worked out, did it overwrite entries in the csv file? That’s what happened when I used it, I could only get the last data in the array so I used option “a” instead which worked
honestly, i did not use for long time so maybe i would get some issues.
but it could be a good starting point I guess or another way to grab those datas