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.
PLEASE READ - Webmaster Support Forum
This forum will be retired in the near future. Please direct all queries to our dedicated GitHub support page https://github.com/vatsimnetwork/developer-info/discussions 
Here you can find documentation on our services and we are continuing to migrate pertinent information into the Wiki pages https://github.com/vatsimnetwork/developer-info/wiki

VATSIM User details web service


Nick Johnston
 Share

Recommended Posts

Nick Johnston
Posted
Posted

Hi all, and season's greetings!

 

 

Is there an existing web service anywhere that lets approved sites (eg. division websites) get information on VATSIM users.

 

Specifically I'm thinking things like:

  • user exists for given CID
  • real name for given CID
  • [Mod - Happy Thoughts]igned division for given CID
  • current rating for given CID
  • CIDs [Mod - Happy Thoughts]igned to given division

 

Access to this sort of information will enable us to develop more robust applications on the division website, such as a properly synchronised division membership database, and a monitoring application to alert division staff when out-of-division or out-of-rating controllers are manning positions in our airspace.

 

If there isn't anything along these lines available currently, what is the process we need to go through to get it built?

 

 

 

Nick

Nick Johnston

IT Director, VATNZ - VATSIM New Zealand
Cross the Ditch Guy, Cross the Ditch

Link to comment
Share on other sites

Richard Jenkins
Posted
Posted (edited)

Yes! If you contact Jim Johnson VP-Membership ([email protected]) he can give you the automated tools docomeent. It will show you how download data directly from VATSIM.

Edited by Guest

RJ

 

Link to comment
Share on other sites

Nick Johnston
Posted
Posted

Got the docomeent off George and it was exactly what I wanted. Thanks!

Nick Johnston

IT Director, VATNZ - VATSIM New Zealand
Cross the Ditch Guy, Cross the Ditch

Link to comment
Share on other sites

  • 5 months later...
Nico Plambeck 904229
Posted
Posted

I've received this docomeent too, thanks to George.

Who has this integrated this in his page and who would give me a look how it works?

Thanks and take care.

 

Nico (Vateud7)

Best regards and take care.

 

Nico Plambeck

Link to comment
Share on other sites

Ivan Kovacevic 920456
Posted
Posted

Nico, I wrote this script to perform the initial import process of all Regional members into the Regional forum (Simple Machines Forum). It's far from being perfect, since it only blindly chucks everything into the database, without any checks - but it pretty much describes in good detail how it all works. It is not a good idea to use this script in any production-type website, it is only a simplified example. I did not want to test it too much (because of the limitation regarding the use of regdb.php and divdb.php) but I have successfully transferred members to a test forum once, so I'm fairly sure it's working.

 

 

<?php
function p[Mod - Happy Thoughts]word()
{
	$a=0;
	$p[Mod - Happy Thoughts]word = "";
	$chars = "abcdefghijklmnopqrstuvwxyz0123456789";
	while($a < 8)
	{
		$p[Mod - Happy Thoughts]word .= $chars[rand(0,strlen($chars) - 1)];
		$a++;
	}
	return $p[Mod - Happy Thoughts]word;
}
function get_memberlist($div)
{
	$curl = curl_init();
	$opts = array(	CURLOPT_URL=> "http://cert.vatsim.net/vatsimnet/admin/divdb.php",
  						CURLOPT_RETURNTRANSFER=> 1,
  						CURLOPT_POST=>1,
  						CURLOPT_POSTFIELDS=>"authid=xxxxxx&authp[Mod - Happy Thoughts]word=yyyyyy&div=".$div,
  						CURLOPT_RETURNTRANSFER=>1,
  						CURLOPT_FILE=>"./vatme_members.txt"
  					);
	curl_setopt_array($curl,$opts);
	$bool = curl_exec ($curl);
	if($bool)
	{
		curl_close ($curl);
	}
	return $bool;
}
get_memberlist("AFR");
mysql_connect("localhost","root","p[Mod - Happy Thoughts]word");
mysql_select_db("smf_forum");
$members = file("vatme_members.txt");
/*
The array $rating is used to match up the VATSIM ratings
in reference to the Simple Machines forum Group IDs. This allows members
to be sorted into several membership groups. The VATSIM ratings are
array keys (0-12) and array values represent the Forum Group IDs.
*/
$rating = array(13,12,5,6,6,7,8,8,9,10,10,11,1);
foreach($members as $member)
{
	$member = explode(",",$member);
	if($member[0] > 800000) //Don't want special 'membership processing' accounts to be ported to the forum
	{
		$memberName = $member[0];
		$dateRegistered = strtotime($member[10]);
		$realName = mysql_real_escape_string($member[2]." ".$member[3]." ".$member[0]);
		$pwd = p[Mod - Happy Thoughts]word();
		$p[Mod - Happy Thoughts]wd = sha1($memberName.$pwd);
		$emailAddress = $member[4];
		$ID_GROUP = $rating[$member[1]];
		$query = "STANDARD MYSQL INSERT QUERY WITH APPROPRIATE FIELDS";
		$res = mysql_query($query);
		if($res) echo $memberName." ".$pwd."\n";
		else die("FATAL ERROR!! ".mysql_error());
	}
	else continue;
}
?>

 

 

 

Hope this answers your question.

Link to comment
Share on other sites

 Share