MrAmsterdam Posted August 17, 2010 Report Share Posted August 17, 2010 Hi guys, I would like to add our rank (serious-airlines.com) to my phpvms website for our members to quickly see the rank that we are at that specific moment. is this possible? Regards, Lucas Quote Link to comment Share on other sites More sharing options...
Administrators Nabeel Posted August 17, 2010 Administrators Report Share Posted August 17, 2010 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... 1 Quote Link to comment Share on other sites More sharing options...
MrAmsterdam Posted August 17, 2010 Author Report Share Posted August 17, 2010 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! Quote Link to comment Share on other sites More sharing options...
Moderators joeri Posted August 17, 2010 Moderators Report Share Posted August 17, 2010 working like a charm www.tnt-virtual.be Quote Link to comment Share on other sites More sharing options...
MrAmsterdam Posted August 18, 2010 Author Report Share Posted August 18, 2010 Jups.. works fine baby!! :-) WOOOHOOOOOO! Quote Link to comment Share on other sites More sharing options...
TAV1702 Posted August 18, 2010 Report Share Posted August 18, 2010 I can confirm, it works great! Quote Link to comment Share on other sites More sharing options...
Txmmy83 Posted September 10, 2010 Report Share Posted September 10, 2010 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 Quote Link to comment Share on other sites More sharing options...
TAV1702 Posted September 11, 2010 Report Share Posted September 11, 2010 You can put it anywhere you want on a tpl file. I chose to put mine on the front page in a box on the left side of the page. Quote Link to comment Share on other sites More sharing options...
Txmmy83 Posted September 11, 2010 Report Share Posted September 11, 2010 Thank you very much for quick reply will probably put the Rank below the recent PIREP in my sidebar Best Regards Thomas Quote Link to comment Share on other sites More sharing options...
TAV1702 Posted September 11, 2010 Report Share Posted September 11, 2010 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. Quote Link to comment Share on other sites More sharing options...
James142 Posted September 30, 2010 Report Share Posted September 30, 2010 (edited) [removed] Edited September 2, 2011 by James142 Quote Link to comment Share on other sites More sharing options...
flyalaska Posted February 27, 2011 Report Share Posted February 27, 2011 Is it possible to change the font size? Quote Link to comment Share on other sites More sharing options...
greertr Posted March 1, 2011 Report Share Posted March 1, 2011 Is it possible to change the font size? Here's one way, Eddie... echo "<div style='text-align: center; font-weight: bold; font-size: 500%; color: #FF9900'> {$xml->rank} </div>"; demo url: Virtual Sim eXtremev VSX Web Site (note: I have it displayed on the bottom left of my main web page) Quote Link to comment Share on other sites More sharing options...
flyalaska Posted March 1, 2011 Report Share Posted March 1, 2011 That's exactly what I am looking for. Thank you! Quote Link to comment Share on other sites More sharing options...
llju1 Posted May 26, 2011 Report Share Posted May 26, 2011 (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 Thanks Lloyd Got it fixed duh so simple Thanks Edited May 26, 2011 by llju1 Quote Link to comment Share on other sites More sharing options...
Heliguy Posted December 1, 2011 Report Share Posted December 1, 2011 Thanks works fine Quote Link to comment Share on other sites More sharing options...
Colin Posted June 17, 2012 Report Share Posted June 17, 2012 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 Quote Link to comment Share on other sites More sharing options...
flyalaska Posted June 17, 2012 Report Share Posted June 17, 2012 Put the entire code where ever you want to display it. Example. <?php $cws = new CodonWebService(); $xml = $cws->get('http://www.vacentral.net/airline/cva_canadianvirtualairlines/xml'); $xml = simplexml_load_string($xml); echo "Our airline's rank is {$xml->rank}"; ?> Replace the VACentral URL with your VA's VACentral URL. Quote Link to comment Share on other sites More sharing options...
josh90 Posted January 18, 2013 Report Share Posted January 18, 2013 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 Quote Link to comment Share on other sites More sharing options...
josh90 Posted February 17, 2013 Report Share Posted February 17, 2013 Bump. Quote Link to comment Share on other sites More sharing options...
flyalaska Posted October 18, 2015 Report Share Posted October 18, 2015 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 Quote Link to comment Share on other sites More sharing options...
Administrators simpilot Posted October 18, 2015 Administrators Report Share Posted October 18, 2015 I would like that too I have added it to the feed. $xml->total_airlines It is only active airlines, not the total count. 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.