freshJet Posted June 15, 2013 Report Share Posted June 15, 2013 I'm sure some will have discovered Charts.aero, they're a relatively new charts site. Love the site now because it's clean and easy to use, charts are synchronised at least hourly, but best of all, there's an API available. Problem is, I can't handle APIs. The API can be found here. There are three ways to retrieve charts; by search string, by IATA and by ICAO. I'll do it through all I think, but just use ICAO for now. This is the PHP for the ICAO retrieval: $response = Unirest::post( "https://charts.p.mashape.com/retrieve/icao", array( "X-Mashape-Authorization" => "******************************" ), array( "icao" => "", )); You'll notice the Unirest class, that's required, get it here. From here on, I'm clueless. How would this work? I'm going to test it through Vansers' charts module, so I've commented out the code that retrieves the airport charts from the database and instead use the PHP above. Anyone care to help out? Quote Link to comment Share on other sites More sharing options...
Members Vangelis Posted June 15, 2013 Members Report Share Posted June 15, 2013 I can have a look at thim but i will need some time if you can wait a couple of days one fast look that i took is that if you make an iframe looking at http://charts.aero/airport/airport that you want the charts will come up Quote Link to comment Share on other sites More sharing options...
Tom Posted June 15, 2013 Report Share Posted June 15, 2013 Not tested but you can give it a go. Let me know if anything needs changing (not going to subscribe to test...) https://github.com/t...rts.Aero-phpVMS Also you really should remove your authorisation code from your post. Quote Link to comment Share on other sites More sharing options...
freshJet Posted June 15, 2013 Author Report Share Posted June 15, 2013 Thanks very much, I'll give it ago. And woops, didn't even notice. Quote Link to comment Share on other sites More sharing options...
freshJet Posted June 15, 2013 Author Report Share Posted June 15, 2013 OK, threw it together and gave it ago: Fatal error: Cannot use object of type stdClass as array in /home/freshjet/public_html/core/common/AeroCharts.class.php on line 61 Line 61: if($response == NULL || $response['status'] !== 'success'){ Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.