Jump to content

You're browsing the 2004-2023 VATSIM Forums archive. All content is preserved in a read-only fashion.
For the latest forum posts, please visit https://forum.vatsim.net.

Need to find something? Use the Google search below.

Who is online?


Brendan Samson 1070087
 Share

Recommended Posts

Brendan Samson 1070087
Posted
Posted (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 by Guest
8629.png
Link to comment
Share on other sites

Brian Fuller 973577
Posted
Posted

Have you tried ServInfo yet?

Link to comment
Share on other sites

David Klain 874106
Posted
Posted

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

Brendan Samson 1070087
Posted
Posted

I tried VatsimPHP (bbflights.com) but to be honest, I don't know anything about PHP and got lost

8629.png
Link to comment
Share on other sites

Brian Fuller 973577
Posted
Posted

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

Brendan Samson 1070087
Posted
Posted
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

8629.png
Link to comment
Share on other sites

Brian Fuller 973577
Posted
Posted

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

Brendan Samson 1070087
Posted
Posted
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.

8629.png
Link to comment
Share on other sites

Larry James 901346
Posted
Posted
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

Brian Fuller 973577
Posted
Posted

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

Brendan Samson 1070087
Posted
Posted

THANK YOU SOOOOO MUCH!

8629.png
Link to comment
Share on other sites

Brendan Samson 1070087
Posted
Posted

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!

8629.png
Link to comment
Share on other sites

Brian Fuller 973577
Posted
Posted

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

Brendan Samson 1070087
Posted
Posted

Where do I get the VatsimPHPgenerator.php?

8629.png
Link to comment
Share on other sites

Brian Fuller 973577
Posted
Posted

http://www.bbflights.com/VatsimPHP/download.php

 

Follow the Text File instructions there.

Link to comment
Share on other sites

Brendan Samson 1070087
Posted
Posted

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.

8629.png
Link to comment
Share on other sites

Brian Fuller 973577
Posted
Posted

And which file has the code I entered above?

Link to comment
Share on other sites

 Share