SOAP is a lightweight protocol for exchange of information in a decentralized, distributed environment. It is an XML based protocol that consists of three parts: an envelope that defines a framework for describing what is in a message and how to process it, a set of encoding rules for expressing instances of application-defined datatypes, and a convention for representing remote procedure calls and responses. SOAP can potentially be used in combination with a variety of other protocols; however, the only bindings defined in this document describe how to use SOAP in combination with HTTP and HTTP Extension Framework.Th SOAP protocol is used as a means to transfer information between applications existing on remote web servers and the central NBT automation and datatbases.
NuSOAP is a rewrite of SOAPx4, provided by NuSphere and Dietrich Ayala. It is a set of PHP classes - no PHP extensions required - that allow developers to create and consume web services based on SOAP 1.1, i WSDL 1.1 and HTTP 1.0/1.1.
|
include 'lib/nusoap.php'; $c = new soapclient('http://www.netbattletech.com/nbt-hc/services.php'); $unitListing = $c->call('getUnitListing'); |
|
include 'lib/nusoap.php'; $c = new soapclient('http://www.netbattletech.com/nbt-hc/services.php'); $unitData = $c->call('getUnitData', array('unitname' => $name); |
Array ( [ID] => 507
[UnitName] => Avanti's Angels
[Unit_Abbrv] =>
[Active] => 0
[ActiveTime] => 0
[Viewable] => 0
[Class] => Merc
[CO_Callsign] => Wilhelm Barret
[CO_Email] => many_tails@hotmail.com
[XO_Callsign] => Vanguard
[Homepage] => http://www.clansnowraven.com
[House] => 0
[Description] => Survivors without equal, Marcus GioAvanti's Angels have
faced vicious Clan assaults. They have matched wits with
House Kurita. Brushed back brutal reprisals from the
Marian Hegemony and the Word of Blake. The Angels
take all comers.
[Logo] => 0
[Timezone] => Eastern
[Pilots] => 5
[Battles] => 0
[Wins] => 0
[Losses] => 0
[Win_Percent] => 0.00
[Planets_Gained] => 0
[Planets_Lost] => 0
[Net_Planets_Gained] => 0
[Offensive_PA_Battles] => 0
[Defensive_PA_Battles] => 0
[Offensive_GRaid_Battles] => 0
[Defensive_GRaid_Battles] => 0
[Offensive_Raid_Battles] => 0
[Defensive_Raid_Battles] => 0
[Offensive_Industry_Battles] => 0
[Defensive_Industry_Battles] => 0
[Offensive_Factory_Battles] => 0
[Defensive_Factory_Battles] => 0
[Offensive_Recon_Battles] => 0
[Defensive_Recon_Battles] => 0
[Offensive_Tresspass_Dispute_Battles] => 0
[Defensive_Tresspass_Dispute_Battles] => 0
[Total_Tresspass_Dispute_Battles] => 0
[Total_PA_Battles] => 0
[Total_GRaid_Battles] => 0
[Total_Raid_Battles] => 0
[Total_Industry_Battles] => 0
[Total_Factory_Battles] => 0
[Total_Recon_Battles] => 0
[Tags] => =A²=
) |
| include
'lib/nusoap.php'; $authRequest ['unitname'] = 'Outworlds Alliance'; $authRequest['password'] = 'asdf123'; $authRequest['callsign'] = 'BassPlayer'; $soapObject = array(); $authData = array(); $battleData = array(); $soapObject = new soapclient('http://localhost/nbt-hc/services.php'); $authData = $soapObject->call('auth', array('AuthRequest' => $authRequest)); |
| include
'lib/nusoap.php'; $authRequest['unitname'] = 'Outworlds Alliance'; $authRequest['password'] = 'asdf123'; $authRequest['callsign'] = 'BassPlayer'; $soapObject = array(); $authData = array(); $battleData = array(); $soapObject = new soapclient('http://localhost/nbt-hc/services.php'); $authData = $soapObject->call('auth', array('AuthRequest' => $authRequest)); if($authData['status'] == 0) { $playerData['sess_id'] = $authData['sess_id']; $playerData['Callsign'] = 'BassPlayer'; $playerData['Assignment'] = 'New Assignement; $status = $soapObject->call('updatePlayerData', array('PlayerData' => $playerData)); $deauthRequest['sess_id'] = $authData['sess_id']; $deauthData = $c->call('deauth', array('deauthRequest' => $deauthRequest)); } |
Obtaining
You can get NBT-Clients from http://www.angmar.com.
Installation
http://www.yourdomain.com/nbt-clients/bio.php?callsign=yourcallsign
or
http://www.yourdomain.com/nbt-clients/bio.php?callsign=yourcallsign
or
< img src="http://www.yourdomain.com/nbt-clients/yourcallsign.png>
or
[img]http://www.yourdomain.com/nbt-clients/yourcallsign.png[/img]
|
||||||