Jump to content

Vatsim Data Reader


simpilot

Recommended Posts

  • 1 month later...

hello all,

i changed the table.tpl and now i just get my own pilots data whith any callsigns in my site, here is the changed code for all :

<table width="100%">
<tr>
		<th>Call Sign</th>
		<th>CID</th>
		<th>Real Name</th>
		<th>Aircraft</th>
</tr>
<?php
$roster = PilotData::getAllPilots();
foreach($roster as $pilot)
{
		if ($flights)
		{
				foreach($flights as $flight)
				{
			if ($flight[1] == PilotData::GetFieldValue($pilot->pilotid, 'VATSIM ID'))
			{
						echo '<tr>';
						echo '<td>'.$flight[0].'</td>';
						echo '<td>'.$flight[1].'</td>';
						echo '<td>'.$flight[2].'</td>';
						echo '<td>'.$flight[9].'</td>';
						echo '</tr>';
			}
				}
		}
}
?>
</table>

and to show the vatsim information of your pilots use this code on any pages of your site :

<?php MainController::Run('Vatsim', 'create_vatsim_table', '!CLIENTS:', 'PILOT', ''); ?>

just another thing!! you need to add the field "VATSIM ID" in your REGISTRATION MAIN FORM! and your pilots must enter their VID correctly!

Link to comment
Share on other sites

  • 3 weeks later...
  • Moderators

Remember, it's not my whole work... I only just added a map.

I'll add a pull request to simpilot and see if's he's okay with it.

Download Here

View Changes Here

Show All Online Flights Map

<?php MainController::Run('Vatsim', 'create_vatsim_livemap', '!CLIENTS:', 'PILOT', ''); ?>

Show only a airline online flights Map

<?php MainController::Run('Vatsim', 'create_vatsim_livemap', '!CLIENTS:', 'PILOT', 'AAL'); ?>

Show more than one online airline flights Map..

<?php MainController::Run('Vatsim', 'create_vatsim_livemap', '!CLIENTS:', 'PILOT', array('AAL', 'UAL', 'SWA')); ?>

Enjoy!

Link to comment
Share on other sites

  • 5 months later...
  • 5 weeks later...

.ok, i am lost here

i downloaded your module, then in the VATSIM module file, i changed the URL to my TXT file.

I uploaded the files to my server

But, where do i put those example lines such as

?php MainController::Run('Vatsim', 'create_vatsim_livemap', '!CLIENTS:', 'PILOT', ''); ?>

where do i put this?

Link to comment
Share on other sites

  • 2 weeks later...
  • Administrators

.ok, i am lost here

i downloaded your module, then in the VATSIM module file, i changed the URL to my TXT file.

I uploaded the files to my server

But, where do i put those example lines such as

?php MainController::Run('Vatsim', 'create_vatsim_livemap', '!CLIENTS:', 'PILOT', ''); ?>

where do i put this?

You can place that in the template where you would like the map to display.

Link to comment
Share on other sites

  • 5 months later...
  • Administrators

Is possible have the same module for ivao system?

Yes, you just have to change a few things in the module.

Set the data feed urls to the IVAO url's that you can find on a daily basis here -> http://www.ivao.aero/whazzup/status.txt

You will also have to Change the !CLIENTS: identifier to just !CLIENTS I believe, you may have to mess with the data file a little as it has some slight differences than the Vatsim version.

I would also make another module using this code for an IVAO version and have it set to use IVAO wherevever you would normally use VATSIM.

Link to comment
Share on other sites

  • 1 month later...
  • Administrators

Well, its not downloading it in that case then, is it because the main VATSIM server is down?

The script is setup to grab the actual whazzup file from one of four servers that are independent of the main vatsim server. Unfortunatly all these locations get their data from the Vatsim server. I chacked http://info.vroute.net/vatsim-data.txt and http://fsproshop.com/servinfo/vatsim-data.txt and neither of them have data so I am guessing you are stuck until Vatsim comes back up. The status file for available data locations is also down. http://status.vatsim.net

Link to comment
Share on other sites

The script is setup to grab the actual whazzup file from one of four servers that are independent of the main vatsim server. Unfortunatly all these locations get their data from the Vatsim server. I chacked http://info.vroute.net/vatsim-data.txt and http://fsproshop.com...vatsim-data.txt and neither of them have data so I am guessing you are stuck until Vatsim comes back up. The status file for available data locations is also down. http://status.vatsim.net

Alright cheers simpilot, I'll have a go again when VATSIM is back up.

Link to comment
Share on other sites

  • Administrators

Hi sim pilot the data feeds links in the vatsim.php but for some reason its still not creating the new vatsim file in the root of my install have you got any ideas what could be wrong?

The issue is explained in the posts above yours. I do not know when the data feeds will return.

Link to comment
Share on other sites

Hi there,

Great addition Kyle to Simpilots work. One question if I may. To show the ATC online on the map I tried to put in "ATC" instead of "PILOT" but doesnt seem to work. Is there something else I need to change.

<?php MainController::Run('Vatsim', 'create_vatsim_livemap', '!CLIENTS:', 'ATC', ''); ?>

Thanks in advance

Link to comment
Share on other sites

  • Administrators

I know you do not know when the data feeds are back up i have check when i put this post up and they were back online but as i stated the vatsim data file is still not being created

When I made my post the links were still down, as of this morning they are up again, at least for the moment from the looks of the posts in the Vatsim developers forum. You should have no issue at this point, if you do, then I would look at what you have changed on your install that would make the file not save to your server. Permissions, IP blocks, changed folder structure, etc...

Link to comment
Share on other sites

  • Administrators

Hi there,

Great addition Kyle to Simpilots work. One question if I may. To show the ATC online on the map I tried to put in "ATC" instead of "PILOT" but doesnt seem to work. Is there something else I need to change.

<?php MainController::Run('Vatsim', 'create_vatsim_livemap', '!CLIENTS:', 'ATC', ''); ?>

Thanks in advance

He will have to look at the structure of the map template and the data that is returned from the vatsim file for ATC and make some changes to allow for ATC data to be shown from what I can tell by quickly going over the files.

Link to comment
Share on other sites

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...