ncd200

Flight report to the VA website

Recommended Posts

Hello,

I am a proud user of PACX and after the last update it has become amazing so good job with that.

Now to my question, I know VAOS has integrated the feature to show the flight reports to your profile.

I am uding PHPVMS and I want to show the report on the pirp report.

 

How do I achive this?

 

Thanks in advance,

 

Rick Winkelman

DutchWings Virtual Skyways

www.dutchwings-va.com

  • Like 1

Share this post


Link to post
Share on other sites

Rick,

First off, I'm very glad you're enjoying PACX! We've got even more coming, so it will only improve from here. Regarding the display on the website: currently, the capability is there if you were to submit the PACX flight log URL as a comment in the PIREP and build a module to read it. It would require custom code, however. If you've got someone on your team who can do that, we would be glad to speak with you/team and help make that happen!

Share this post


Link to post
Share on other sites

Collin,

Thanks for the reply, I can code a bit but I only need the script to convert the url to display it inside the webpage like VAOS.

I'm looking forward to the upcomming items.

 

Rick

Share this post


Link to post
Share on other sites

Absolutely! So, the easiest way to do it is to pull the XML form of the flight. You can do so by appending "/xml" to the URL PACX provides. For example, here is a (testing) flight entry from my account: https://pacx.online/flight/6f013d78-afb3-4075-abef-0df95748150c

If you add the /xml: https://pacx.online/flight/6f013d78-afb3-4075-abef-0df95748150c/xml you can parse it as is. You could grab this URL from a PIREP comment, as every one will start with https://pacx.online/flight/ and end with /xml (you could parse is via explode, etc. in PHP so you don't have to enforce format requirements).

To actually read the data, I've attached some PHP code I've used to handle it on our side.

 

$xml = simplexml_load_string($the_string_of_your_xml, "SimpleXMLElement", LIBXML_NOCDATA);
/*Data is accessed by $xml-> then the element name. */
$fr = $xml->FlightReport;    
echo($fr->UID);
echo($fr->DepartureAirport->Airport->Latitude);
echo($fr->DepartureAirport->Airport->Longitude);
echo($fr->EstimatedDepartureTime);

 

Share this post


Link to post
Share on other sites

Okay, now maybe a very stupid questio...

Where do I find my link for the flights? I am looking in my profile when logged in on the tfdi website under my services. It seems the link is not there anymore bacause it is now saved localy?

 

Rick

Share this post


Link to post
Share on other sites

They'll all inside PACX now - things are backed up too the cloud, still, but it's passive and automatic (to make it easier on the user). The flight link can be found via the "Records" page in PACX.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.