So, I ran it for a week using a cron job (someone can probably figure out how to do that) but as you see from the code, it is the definition of a mess and no documentation.
I also found an issue since I was calculating the time by checking the difference between departure time and arrival, which could give unrealistic times if for example you depart 18:00 and arrive 01:00, it would say flighttime is 17:00…
Another thing I need to fix is the days of week a flight is flown, which was always set to all days. This time it will check for existing entry and if it exits, it will update this to include the correct day of week
Right now, I am rewriting it and documenting, so “stay tuned” when next version is released.
$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…
Would you be willing to share this script and some instructions on how to get it to work?