Difference between revisions of "Tracking Protocol"

From Silent Wings Wiki
Jump to: navigation, search
Line 50: Line 50:
 
server time of the tracking server.
 
server time of the tracking server.
  
Command:
+
'''Command:'''
  
 
  getprotocolinfo.php
 
  getprotocolinfo.php
  
Parameters:
+
'''Parameters:'''
 +
 
 
  username=<user name>
 
  username=<user name>
 
  cpassword=<encrypted password>
 
  cpassword=<encrypted password>
  
Returns:
+
'''Returns:'''
 +
 
 
  {version}1.3{/version}{date}20080811{/date}{time}1218457469{/time}
 
  {version}1.3{/version}{date}20080811{/date}{time}1218457469{/time}
  
Tags:
+
'''Tags:'''
  
* 'version' Version number string. Should be 1.3 to be in compliance with this document.
+
* ''version'' Version number string. Should be 1.3 to be in compliance with this document.
 
* ''date'' Server date: YYYYMMDD
 
* ''date'' Server date: YYYYMMDD
* time Server time in seconds since 1/1 1970
+
* ''time'' Server time in seconds since 1/1 1970
  
  
 
[[Category:Tracking]]
 
[[Category:Tracking]]

Revision as of 09:13, 6 August 2010

Introduction

The Silent Wings Viewer protocol is an HTTP based protocol with a set of commands that match a set of URL's with parameters that typically correspond to a set of PHP scripts. There are generally two phases of the tracking protocol, first initialization where the client sets up the tracking for a given competition day based on input from the user. The next phase is the actual tracking where the client requests fix data from the tracking server at regular intervals.

Here is a schematic illustration of a typical tracking session:

Tracking.png

Protocol

The following section contains a description of the available protocol commands used by the viewer client.

The general format for each command is:

http://server/command.php?param1=foo&param2=bar

etc.

Most of the commands return a series of tags much like HTML tags, only with curly brackets instead of angle brackets. For example:

getprotocolinfo.php?username=jane&cpassword=87f89daecd2dbe1bc62bb2f20bb81f55

returns:

{version}1.3{/version}{date}20080811{/date}{time}1218457469{/time}

Authentication

Most of the commands require a user name and password as input. These are specified in the username/password parameters:

http://tracking.silentwings.no//getactivecontests.php?username=john&cpassword=85f8addecd2dbf8bc62bb0f20bb31f51&version=1.2

The password should be given in encrypted form. The password is encrypted with user name as «encryption salt», i.e as the MD5 digest of the following string:

<password><username>

There should be no whitespace between the clear text password and the username. To authenticate you need to encrypt the clear text password with the same hash string (username) and compare the two encrypted passwords.

Commands

getprotocolinfo

This command is normally used during startup of the client to get the protocol version number and server time of the tracking server.

Command:

getprotocolinfo.php

Parameters:

username=<user name>
cpassword=<encrypted password>

Returns:

{version}1.3{/version}{date}20080811{/date}{time}1218457469{/time}

Tags:

  • version Version number string. Should be 1.3 to be in compliance with this document.
  • date Server date: YYYYMMDD
  • time Server time in seconds since 1/1 1970