As all of us must be knowing , the default briefing doesn’t retrieve charts out of USA ARTCCs.
I have found a website called “AirCharts.org” with an open free API that lists all charts according to ICAO worldwide.
Unfortunately , I don’t have much PHP knowledge. If someone could code this , it would be a great help to all virtual airlines all over the world.
API
AirCharts' new, open API is now available for public use. Use of the API is in accordance with the API Agreement.
Usage:
Airport Information and Charts: http://api.aircharts.org/Airport/(ICAO).(format)
List of Airports and Charts: http://api.aircharts.org/Airport/(ICAO),(ICAO),(ICAO).(format) [up to 15]
Available formats: JSON (default), XML.
Examples:
http://api.aircharts.org/Airport/KNPA.json
http://api.aircharts.org/Airport/KPNS,KNPA,KNDZ,KNSE,KJKA.json
http://api.aircharts.org/Airport/KNPA,KPNS,KNDZ,KNSE,KJKA.xml
This module was working perfectly a week or two ago. Today I am getting the following errors when attempting to access an airport that AirCharts supplies charts for.
Warning: file\_get\_contents(): Peer certificate CN=`nameitcreateit.com' did not match expected CN=`api.aircharts.org' in /home/xxxx/public\_html/xxxx/phpvms/core/modules/Aircharts/Aircharts.php on line 40 Warning: file\_get\_contents(): Failed to enable crypto in /home/xxxx/public\_html/xxxx/phpvms/core/modules/Aircharts/Aircharts.php on line 40 Warning: file\_get\_contents(http://api.aircharts.org/Airport/KLAS.json): failed to open stream: operation failed in /home/xxxx/public\_html/xxxx/phpvms/core/modules/Aircharts/Aircharts.php on line 40
It looks like the AirCharts site has the ability to use ‘https’ instead of ‘http’. I tried changing the ‘http’ entries to ‘https’ in …/modules/Aircharts/Aircharts.php and received the same error.
Also, looks like version 2 of the API was released (https://api.aircharts.org/). I tried changing the 3 $apiurl lines (17, 28, 39) in Aircharts.php to reflect this change and continued to receive the same error.
The only item on my site that changed is we added SSL (https). But after getting that all set up, everything (including AirCharts) worked fine - until today.
Also just noticed in Error_log a bunch of similar errors starting on 12/17/2017.
[22-Dec-2017 10:17:37 America/Los\_Angeles] PHP Warning: file\_get\_contents(): Failed to enable crypto in /home/xxxx/public\_html/xxxx/phpvms/core/modules/Aircharts/Aircharts.php on line 18 [22-Dec-2017 10:17:37 America/Los\_Angeles] PHP Warning: file\_get\_contents(http://api.aircharts.org/Airport/KASE.json): failed to open stream: operation failed in /home/xxxx/public\_html/xxxx/phpvms/core/modules/Aircharts/Aircharts.php on line 18 [22-Dec-2017 10:17:38 America/Los\_Angeles] PHP Warning: file\_get\_contents(): SSL operation failed with code 1. OpenSSL Error messages: error:14090086:SSL routines:SSL3\_GET\_SERVER\_CERTIFICATE:certificate verify failed in /home/xxxx/public\_html/xxxx/phpvms/core/modules/Aircharts/Aircharts.php on line 18 [22-Dec-2017 10:17:38 America/Los\_Angeles] PHP Warning: file\_get\_contents(): Failed to enable crypto in /home/xxxx/public\_html/xxxx/phpvms/core/modules/Aircharts/Aircharts.php on line 18 [22-Dec-2017 10:17:38 America/Los\_Angeles] PHP Warning: file\_get\_contents(http://api.aircharts.org/Airport/KDEN.json): failed to open stream: operation failed in /home/xxxx/public\_html/xxxx/phpvms/core/modules/Aircharts/Aircharts.php on line 18 [22-Dec-2017 10:27:42 America/Los\_Angeles] PHP Warning: file\_get\_contents(): Peer certificate CN=`nameitcreateit.com' did not match expected CN=`api.aircharts.org' in /home/xxxx/public\_html/xxxx/phpvms/core/modules/Aircharts/Aircharts.php on line 18 [22-Dec-2017 10:27:42 America/Los\_Angeles] PHP Warning: file\_get\_contents(): Failed to enable crypto in /home/xxxx/public\_html/xxxx/phpvms/core/modules/Aircharts/Aircharts.php on line 18
The first 4 occur from 12/17 to the date/time shown. The later 3 show from that date/time to present.
This module was working perfectly a week or two ago. Today I am getting the following errors when attempting to access an airport that AirCharts supplies charts for.
Warning: file_get_contents(): Peer certificate CN=nameitcreateit.com' did not match expected CN=api.aircharts.org’ in /home/xxxx/public_html/xxxx/phpvms/core/modules/Aircharts/Aircharts.php on line 40 Warning: file_get_contents(): Failed to enable crypto in /home/xxxx/public_html/xxxx/phpvms/core/modules/Aircharts/Aircharts.php on line 40 Warning: file_get_contents(http://api.aircharts.org/Airport/KLAS.json): failed to open stream: operation failed in /home/xxxx/public_html/xxxx/phpvms/core/modules/Aircharts/Aircharts.php on line 40
It looks like the AirCharts site has the ability to use ‘https’ instead of ‘http’. I tried changing the ‘http’ entries to ‘https’ in …/modules/Aircharts/Aircharts.php and received the same error.
Also, looks like version 2 of the API was released (https://api.aircharts.org/). I tried changing the 3 $apiurl lines (17, 28, 39) in Aircharts.php to reflect this change and continued to receive the same error.
The only item on my site that changed is we added SSL (https). But after getting that all set up, everything (including AirCharts) worked fine - until today.
Any help is much appreciated.
Go to the and re-download the module, I have updated it to the API Version 2 and also have a workaround for the SSL Issue (temporary). It should work now.
Warning: Invalid argument supplied for foreach() in /storage/ssd3/285/3946285/public\_html/core/templates/aircharts/aircharts\_chartslist.php on line 49
Go to the and re-download the module, I have updated it to the API Version 2 and also have a workaround for the SSL Issue (temporary). It should work now.
Thank you - works great!
My basic understanding of the temporary SSL workaround is that it bypasses the SSL check - is that correct?
Warning: Invalid argument supplied for foreach() in /storage/ssd3/285/3946285/public_html/core/templates/aircharts/aircharts_chartslist.php on line 49
US charts work fine
Can you give me an ICAO that does this, their supported airports are listed here https://www.aircharts.org/
4 minutes ago, ProAvia said:
Thank you - works great!
My basic understanding of the temporary SSL workaround is that it bypasses the SSL check - is that correct?
Yes it bypasses SSL verification only for the charts, haven’t figured out a way to use file_get_contents with SSL correctly (cURL could work). This is something I’ve never seen before. It’s possible that their API doesn’t support secure connections as of yet (hence why it says “Your connection is not private” when visiting their API)