Brendan Samson 1070087 Posted December 21, 2008 at 06:19 AM Posted December 21, 2008 at 06:19 AM (edited) This is not a hardware question, but since it didn't fit into any other category I decided to put it here, Does any body know of a way for me to display if any of the following ATC positions our on (for our website): FRG_TWR FRG_GND FRG_DEL, TEB_TWR TEB_GND TEB_DEL, DXR_TWR DXR_GND DXR_DEL, ISP_TWR ISP_GND ISP_DEL Also, what about a way to display all pilots online with www.NewYorkFlyingClub.net in their flight plan? Edited December 21, 2008 at 02:59 PM by Guest Link to comment Share on other sites More sharing options...
Brian Fuller 973577 Posted December 21, 2008 at 07:21 AM Posted December 21, 2008 at 07:21 AM Have you tried ServInfo yet? Link to comment Share on other sites More sharing options...
David Klain 874106 Posted December 21, 2008 at 05:57 PM Posted December 21, 2008 at 05:57 PM What you are looking for is a script that p[Mod - Happy Thoughts]s the VATSIM data feed to extract the data you want. Do a forum search for data feed and it will start you in the right direction. There are a number of scripts out there people have offered, but they all require modification to extract just the data you want. Also be aware you need to configure your pull script correctly or you will be slamming the VATSIM server and get blocked (there are several posts about this as well). Dave Link to comment Share on other sites More sharing options...
Brendan Samson 1070087 Posted December 21, 2008 at 05:59 PM Author Posted December 21, 2008 at 05:59 PM I tried VatsimPHP (bbflights.com) but to be honest, I don't know anything about PHP and got lost Link to comment Share on other sites More sharing options...
Brian Fuller 973577 Posted December 21, 2008 at 06:06 PM Posted December 21, 2008 at 06:06 PM Looks like you can just pull the $VatsimPHPdata['USER'][#]['CALLSIGN'] - the callsign of the client. It's the name the client is recognized on the network array data, do a IF statement for your 4 Prefixes. Link to comment Share on other sites More sharing options...
Brendan Samson 1070087 Posted December 21, 2008 at 06:15 PM Author Posted December 21, 2008 at 06:15 PM Looks like you can just pull the $VatsimPHPdata['USER'][#]['CALLSIGN'] - the callsign of the client. It's the name the client is recognized on the network array data, do a IF statement for your 4 Prefixes. So would this work (while not overloading the network)? <? $url="http://www.bbflights.com/VatsimPHP/download/"; if(!file_exists("VatsimPHPgenerator.php")) { copy($url."VatsimPHPgeneratorupdate.php", "VatsimPHPgenerator.php"); } if(!file_exists("VatsimPHPoptions.txt")) { copy($url."VatsimPHPoptions.txt", "VatsimPHPoptions.txt"); } ?> $VatsimPHPdata['USER'][#]['FRG_TWR'] $VatsimPHPdata['USER'][#]['FRG_GND'] Thanks for all your help Link to comment Share on other sites More sharing options...
Brian Fuller 973577 Posted December 21, 2008 at 06:32 PM Posted December 21, 2008 at 06:32 PM You want to have VatsimPHPgenerator.php on your Webhost, and use INCLUDE to call it in your page, that makes the variables accessible to your code. You can do a printr on the $vatsimPHPdata['USER'] array to see how it uses the data, from there do a IF statement or Switch/Case on your Prefixes. Link to comment Share on other sites More sharing options...
Brendan Samson 1070087 Posted December 21, 2008 at 06:35 PM Author Posted December 21, 2008 at 06:35 PM You want to have VatsimPHPgenerator.php on your Webhost, and use INCLUDE to call it in your page, that makes the variables accessible to your code. You can do a printr on the $vatsimPHPdata['USER'] array to see how it uses the data, from there do a IF statement or Switch/Case on your Prefixes. I'm sorry but I have nooooooooooooooooooooo idea what you are talking about I know almost nothing about php. Link to comment Share on other sites More sharing options...
Larry James 901346 Posted December 21, 2008 at 07:41 PM Posted December 21, 2008 at 07:41 PM You want to have VatsimPHPgenerator.php on your Webhost, and use INCLUDE to call it in your page, that makes the variables accessible to your code. You can do a printr on the $vatsimPHPdata['USER'] array to see how it uses the data, from there do a IF statement or Switch/Case on your Prefixes. I'm sorry but I have nooooooooooooooooooooo idea what you are talking about I know almost nothing about php. It might not be easy to custom design your site without learning some perl or php programming experience. You might consider looking at a PHP tutorial and doing some of the lessons and sample code, then suggestions given to you might start to make more sense (while you wait for someone to possibly do the custom design for you). If you make a few hello world sample codes and add a little conditional routines such as "if" and "then" statements you might soon start to understand it. -- L. James -- L. D. James [email protected] www.apollo3.com/~ljames sticky: Not a regular post, but a special thread/message stuck to the top with special meaning… containing important forum information. For FSInn/VATSIM issues, please test the FSInn Installation sticky and linked FAQ. It really works! Link to comment Share on other sites More sharing options...
Brian Fuller 973577 Posted December 21, 2008 at 08:48 PM Posted December 21, 2008 at 08:48 PM This is a bit rough, but it will get you started, and I have it on my host here http://bdcpaging.com/vatsim/test.php <?PHP include ("VatsimPHPgenerator.php"); foreach( $VatsimPHPdata['USERGET']['CALLSIGN'] as $key => $value){ $first = substr($key, 0, 3); IF ($first == "FRG" || $first == "TEB" || $first == "DXR" || $first == "ISP") { echo "Callsign: $key<br />"; $none = 1; } else { $none = 0; } } IF ($none == 0){ echo "No controllers found";} ?> Link to comment Share on other sites More sharing options...
Brendan Samson 1070087 Posted December 21, 2008 at 08:51 PM Author Posted December 21, 2008 at 08:51 PM THANK YOU SOOOOO MUCH! Link to comment Share on other sites More sharing options...
Brendan Samson 1070087 Posted December 22, 2008 at 12:31 AM Author Posted December 22, 2008 at 12:31 AM http://nyfc.site90.net/online.php Doesn't seem to be working for me, also, do you know how can I show flight plans that have www.NewYorkFlyingClub.net in them? Thanks again! Link to comment Share on other sites More sharing options...
Brian Fuller 973577 Posted December 22, 2008 at 12:43 AM Posted December 22, 2008 at 12:43 AM Looks like you never ran the initial setup to create the VatsimPHPgenerator.php file on your webhost. And in regards to your 2nd question, depends on where that data is, and if it's pulled from that script or not. But you can pull the Pilot prefix. Link to comment Share on other sites More sharing options...
Brendan Samson 1070087 Posted December 22, 2008 at 12:52 AM Author Posted December 22, 2008 at 12:52 AM Where do I get the VatsimPHPgenerator.php? Link to comment Share on other sites More sharing options...
Brian Fuller 973577 Posted December 22, 2008 at 02:08 AM Posted December 22, 2008 at 02:08 AM http://www.bbflights.com/VatsimPHP/download.php Follow the Text File instructions there. Link to comment Share on other sites More sharing options...
Brendan Samson 1070087 Posted December 22, 2008 at 02:47 AM Author Posted December 22, 2008 at 02:47 AM Okay, I did that, you can see what I have installed at http://nyfc.site90.net/ I put all of the files in the VATPhp folder. Link to comment Share on other sites More sharing options...
Brian Fuller 973577 Posted December 23, 2008 at 01:05 AM Posted December 23, 2008 at 01:05 AM And which file has the code I entered above? Link to comment Share on other sites More sharing options...
Recommended Posts