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

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

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

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

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

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

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.

Loading...
×
×
  • Create New...