Jump to content

Recommended Posts

  • Administrators
Posted

Yes, I just added an XML feed, and to access it, get your VA central page, and add /xml to the end of the URL:

IE:

http://www.vacentral.net/airline/cva_canadianvirtualairlines/xml

Then you can call it in phpVMS:

<?php
$cws = new CodonWebService();
$xml = $cws->get('YOUR VACENTRAL XML URL');
$xml = simplexml_load_string($xml);

echo "Our airline's rank is {$xml->rank}";
?>

Moving this to code snippets...

  • Like 1
Posted
  On 8/17/2010 at 6:42 PM, Nabeel said:

Yes, I just added an XML feed, and to access it, get your VA central page, and add /xml to the end of the URL:

IE:

http://www.vacentral.net/airline/cva_canadianvirtualairlines/xml

Then you can call it in phpVMS:

<?php
$cws = new CodonWebService();
$xml = $cws->get('YOUR VACENTRAL XML URL');
$xml = simplexml_load_string($xml);

echo "Our airline's rank is {$xml->rank}";
?>

Moving this to code snippets...

wow... thanks!

  • 4 weeks later...
Posted
  On 8/17/2010 at 6:42 PM, Nabeel said:

Yes, I just added an XML feed, and to access it, get your VA central page, and add /xml to the end of the URL:

IE:

http://www.vacentral.net/airline/cva_canadianvirtualairlines/xml

Then you can call it in phpVMS:

<?php
$cws = new CodonWebService();
$xml = $cws->get('YOUR VACENTRAL XML URL');
$xml = simplexml_load_string($xml);

echo "Our airline's rank is {$xml->rank}";
?>

Moving this to code snippets...

where should I post this code to make it show up on site?

Best Regards

Thomas

Posted
  On 9/11/2010 at 10:55 AM, Txmmy83 said:

Thank you very much for quick reply :)

will probably put the Rank below the recent PIREP in my sidebar

Best Regards

Thomas

No Probs. I hope it works out for you. It seems to be good to go on my site. I used the code that was provided here.

  • 3 weeks later...
  • 4 months later...
  • 2 months later...
Posted (edited)

I am a bit confused. How do you add a xml feed to you site? Silly question I am sure but it has been a while since I have done much it he way of coding. Well a few months anyways :lol:

Thanks

Lloyd

Got it fixed duh so simple

Thanks

Edited by llju1
  • 6 months later...
  • 6 months later...
Posted
  On 8/17/2010 at 6:42 PM, Nabeel said:

Yes, I just added an XML feed, and to access it, get your VA central page, and add /xml to the end of the URL:

IE:

http://www.vacentral.net/airline/cva_canadianvirtualairlines/xml

Then you can call it in phpVMS:

<?php
$cws = new CodonWebService();
$xml = $cws->get('YOUR VACENTRAL XML URL');
$xml = simplexml_load_string($xml);

echo "Our airline's rank is {$xml->rank}";
?>

Moving this to code snippets...

Where do I put the XML code at the end of the URL on VA Central ? if so I did this and it didn't work

  • 7 months later...
  • 5 weeks later...
  • 2 years later...
Posted
  On 1/18/2013 at 12:17 PM, josh90 said:

Great piece of code! Just one question, is there anyway of showing the total amount of airline ranks, for example:

Our airline is rank X out of (Total airlines)

Thanks

Josh

I would like that too

  • Administrators
Posted
  On 10/18/2015 at 6:30 PM, flyalaska said:

I would like that too

I have added it to the feed.

$xml->total_airlines

It is only active airlines, not the total count.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  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.

×
×
  • Create New...