AO PHP Connector Demo

PHP aocon & aolib examples. The following includes/code is required:

<?php
   require_once('aocon-1.2.0.inc.php');
   $aocon = new AOCon();
?>

Query Player ID

PHP Call: $aocon->getPlayerId('king');
PHP Output:
10001

Query Player Info

PHP Call: $aocon->getPlayerInfo(10001);
PHP Output:
king 7 88 1 1807.14 282.438 50 1 1 2008-08-22 1 United States of America

Query Player Infos

PHP Call: $aocon->getPlayerInfo('10001-10002-10003');
PHP Output:
king 7 88 1 1807.14 282.438 50 1 1 2008-08-22 1 United States of America
Klaus 7 2115 3 835.0 145.0 2 1 1 2006-05-14 1
sebthom 7 0 0 900.0 400.0 0 0 1 2000-01-01 1

Query Player Games

PHP Call: $aocon->getPlayerGames(10001, 'longhaul');
PHP Output:
6230 168weekly MiddleEarth goal.open.Name 21503 23 604800 5477 24 13 13 1 0 1 0 1 1

Query Clan ID

PHP Call: $aocon->getClanId('RoyalFamily');
PHP Output:
7

Query Clan Info

PHP Call: $aocon->getClanInfo(7);
PHP Output:
RoyalFamily http://www.aevumobscurum.com 15 The Royal Family of Aevum Obscurum. 28 1227.82

Query Clan Members

PHP Call: $aocon->getClanMembers(7);
PHP Output:
10001 king 1807.14
10002 Klaus 835.0
10003 sebthom 900.0
10007 julia 900.0
10008 jhl007 900.0
10009 kinwang 900.0
10010 andrei 900.0
10013 cikehara 900.0
10021 giglio 775.0
10029 DaddyKool 900.0
10038 Dada 900.0
10055 sabine 900.0
10060 leli 900.0
10090 TypeZero3 900.0
13832 SonOfLothar 1494.13

Query Clan Members by Last Login

PHP Call: $aocon->getClanMembersByLastLogin(7, 0);
PHP Output:
10001 king 1807.14 2008-08-22
13832 SonOfLothar 1494.13 2007-01-14
10002 Klaus 835.0 2006-05-14
10090 TypeZero3 900.0 2006-04-14
10008 jhl007 900.0 2006-03-29
10003 sebthom 900.0 2000-01-01
10060 leli 900.0 2000-01-01
10055 sabine 900.0 2000-01-01
10038 Dada 900.0 2000-01-01
10029 DaddyKool 900.0 2000-01-01
10021 giglio 775.0 2000-01-01
10010 andrei 900.0 2000-01-01
10009 kinwang 900.0 2000-01-01
10007 julia 900.0 2000-01-01
10013 cikehara 900.0 2000-01-01

Query Player Rankings

PHP Call: $aocon->getPlayerRankings(0);
PHP Output:
1 24789 SellSword 2581.81
2 18087 Rezso 2530.38
3 10893 XCalibur 2504.35
4 24567 Revol 2359.49
5 14247 mundialberto 2357.0
6 17387 skywatcher 2351.34
7 22703 battlecow 2348.12
8 19923 SinnerTaint 2337.48
9 16710 uldemir 2278.0
10 23751 KatrinaTheFair 2276.62

PHP Call: $aocon->getPlayerRankings(0, 7);
PHP Output:
1 10001 king 1807.14
2 13832 SonOfLothar 1494.13
3 10002 Klaus 835.0
4 10021 giglio 775.0

Query Clan Rankings

PHP Call: $aocon->getClanRankings(0);
PHP Output:
1 10 Vikings 2094.5
2 43 KingSlayers 1966.48
3 19 MobRules 1962.71
4 39 Girafe 1798.83
5 27 Descubridores 1779.89
6 37 A.O_Republic_Army 1776.5
7 2 DDL 1715.71
8 17 Praetores 1715.09
9 8 GodsOfWar 1696.8
10 6 AchtungPig 1657.87
11 25 KingSnipers 1631.83
12 23 TheKellyGang 1629.63
13 29 Deathstars 1619.7
14 40 MaltaCross 1560.37
15 36 Lietuva 1541.37
16 9 Conquistadores 1532.03
17 22 ShadowRising 1521.37
18 33 Sparta 1487.24
19 46 Guardians-of-the-Secret 1471.72
20 18 USMC 1432.36
21 20 OSMANEN 1403.98
22 42 ViveLaResistance 1395.19
23 11 MasterClass 1319.28
24 41 SchwarzRotGold 1302.83
25 31 Litchois 1257.24
26 16 Black_Dragons 1237.14
27 44 WeaponsofAssDestruction 1235.82
28 7 RoyalFamily 1227.82
29 38 Trainingstars 1188.71
30 21 RedDwarves 1167.53
31 12 KINGS 1120.9
32 5 ClanWulf 1058.2
33 34 UltimaFase 1028.46
34 24 ThrallsMinions 956.962
35 4 FightClub 952.075
36 28 SamKobz 944.995
37 14 polishhomearmy 923.557
38 3 SCC 903.803
39 15 SGCckay07 879.563
40 26 GermanOrder 877.533
41 1 Main 818.223
42 13 Virtue 807.058
43 35 Throne_of_the_Wild 772.744
44 32 BadAss 714.646
45 30 Porro 697.341
46 45 Assassin 0.0

Query Game ID

PHP Call: $aocon->getGameId('league', 'GameName1');
PHP Output:
-1

Query Game Info

PHP Call: $aocon->getGameInfo('league', 3356);
PHP Output:

Universe info not found: 3356

Query Games by Owner

PHP Call: $aocon->getGamesByOwner('longhaul', 10001);
PHP Output:

Query Games by Clan

PHP Call: $aocon->getGamesByClan('longhaul', 7, 0);
PHP Output:

Query Game Standings

PHP Call: $aocon->getGameStandings('league', 3356);
PHP Output:

Universe info not found: 3356

Create League Game

PHP Call: $aocon->createLeagueGame('league', 10000, 'password', 'GameName1', 'Europe-X17', 86400, 1, 3, 2, 32, '0-10000-1-1-10001-0-2-10002-0-3-10003-1-4-10004-1-5-10005-0');
PHP Output:

null

Delete Game

PHP Call: $aocon->deleteGame('league', 10000, 'password', 3356);
PHP Output:

null

Query All Tournaments

PHP Call: $aocon->getTournaments();
PHP Output:
26 Membership Upgrade Tournament 15 The winner of the tournament will be awarded with a free 2-year full Aevum Obscurum membership valued at $34.99. Free to enter! Note: If you are a full member already\comma your membership will be extended for 2 years. http://www.multiplayerhub.com Europe 86400 2009-05-15 4 30 100000 0 0 0 54 0 N/A
23 3rd International AO Stein Tournament Welcome to the 3rd International AO Stein Tournament. The winner will be awarded the Noble Master Stein! Check the forums for details. http://www.multiplayerhub.com Europe 172800 2009-05-01 4 32 100000 0 0 0 36 0 N/A
25 Membership Upgrade Tournament 14 The winner of the tournament will be awarded with a free 2-year full Aevum Obscurum membership valued at $34.99. Free to enter! Note: If you are a full member already\comma your membership will be extended for 2 years. http://www.multiplayerhub.com Europe 86400 2009-03-05 4 30 100000 0 0 0 33 0 N/A
22 2nd AO Darkness Tournament Welcome to the 2nd AO Darkness Tournament. The winner will receive the AO Darkness T-Shirt. Free to enter. Check the forums for details. http://www.multiplayerhub.com Asia 172800 2009-01-09 4 32 100000 0 0 0 37 0 N/A
24 Membership Upgrade Tournament 13 The winner of the tournament will be awarded with a free 2-year full Aevum Obscurum membership valued at $34.99. Free to enter! Note: If you are a full member already\comma your membership will be extended for 2 years. http://www.multiplayerhub.com Europe 86400 2008-12-29 4 30 100000 0 0 0 36 0 N/A
27 1st King Slayer's Ransom Welcome to the 1st King Slayer's Ransom Tournament sponsored by Mercer! The winner will be awarded the Noble Master Stein! Second and third place finishers receive an AO bumper sticker. Check the forums for details. http://www.multiplayerhub.com DaindenByTravisII 172800 2008-11-01 1 31 100000 0 0 0 28 0 N/A
19 Membership Upgrade Tournament 12 The winner of the tournament will be awarded with a free 2-year full Aevum Obscurum membership valued at $34.99. Free to enter! Note: If you are a full member already\comma your membership will be extended for 2 years. http://www.multiplayerhub.com Europe 86400 2008-10-15 4 30 100000 0 0 0 430 0 N/A
15 1st AO Richness Tournament Welcome to the 1st AO Richness Tournament. The winner will receive US$125 in prize money paid via Cheque or PayPal. Free to enter! Check the forums for details! http://www.multiplayerhub.com Europe 172800 2008-10-08 4 30 100000 0 0 0 469 0 N/A
16 3rd Aevum Obscurum Championship Welcome to the 3rd Official Aevum Obscurum Championship tournament. A Gold Member T-Shirt awaits the winner! Check the forums for details. http://www.multiplayerhub.com Europe 172800 2008-09-05 4 32 100000 0 0 0 297 0 N/A
18 Membership Upgrade Tournament 11 The winner of the tournament will be awarded with a free 2-year full Aevum Obscurum membership valued at $34.99. Free to enter! Note: If you are a full member already\comma your membership will be extended for 2 years. http://www.multiplayerhub.com Europe 86400 2008-07-15 4 30 100000 0 2 240 0 36 N/A
20 2nd International AO Stein Tournament Welcome to the 2nd International AO Stein Tournament. The winner will be awarded the Noble Master Stein! Check the forums for details. http://www.multiplayerhub.com Europe 172800 2008-05-01 4 32 100000 0 2 168 8 26 N/A

Query a Player's Tournaments

PHP Call: $aocon->getTournamentsByPlayer(10001);
PHP Output:
15 1st AO Richness Tournament Welcome to the 1st AO Richness Tournament. The winner will receive US$125 in prize money paid via Cheque or PayPal. Free to enter! Check the forums for details! http://www.multiplayerhub.com Europe 172800 2008-10-08 4 30 100000 0 0 0 469 0 N/A 1

Query Tournament Games

PHP Call: $aocon->getTournamentGames(7);
PHP Output:

Query Tournament Players

PHP Call: $aocon->getTournamentPlayers(7, 0, 'e');
PHP Output:

Illegal operation on empty result set.

Cheat Detection

PHP Call: $aocon->cheatDetection(10001, 10002);
PHP Output:
0/10 0/4 2/4 0

Disable Cheater

PHP Call: $aocon->disableCheater(10000, 'password', 10001, 10002);
PHP Output:

For input string: "userid"

News Announcements

PHP Call: $aocon->getNewsAnnouncements();
PHP Output:
22267 Oscar243 23 TheKellyGang hello people !! we need players for PolandRatedNonLateJOINable 1700+ ..60hr turns :-) JOIN UP JOIN UP !! 2008-08-14
28380 Kran-impire 46 Guardians-of-the-Secret I now dismiss me of all the stars\comma who have helped me all this time and we always were and always will be my friends. Now I will leave to found my new clan\comma and will keep in memory all that you taught me. 2008-08-13
23547 Martinus 38 Trainingstars Stars\comma please visit the forum (TS clan forum) and watch out what I wrote about the games I just created. 2008-08-11
11601 Stig 2 DDL Player League quarter finals have restarted due to the server problems we had a couple of days ago 2008-08-09
10617 biohazard 6 AchtungPig Remember honour wins you friends\comma Friends win you games\comma Tourorist as been kicked from the clan due to unacceptable behavior The game effected as been redone those involed see your sites 2008-08-08
10001 king 7 RoyalFamily Problem resolved! I apologize for the problems encountered. Every full/paying member has been given 7 extra days of full memberhip. 2008-08-07
11601 Stig 2 DDL As you will have found out the server is currently having issues (it is online though)\comma but it can take some time before this is solved. Please have patience 2008-08-06
29479 Lord_Artur 41 SchwarzRotGold Fight on the Assassine site under Templer Flag it is a better way fight for the assassin“s Templer and you want see we are overall...come in and find out.. 2008-08-04
29479 Lord_Artur 41 SchwarzRotGold 2008-08-04
11601 Stig 2 DDL The Quarter Finals for the PLAYERS LEAGUE have started\comma visit the forum for more information 2008-08-04
14369 smacked 19 MobRules Today the MOB must say goodby to two of it's fallen members... Mike-D and gdizzle... 2008-07-31
14403 maximus4 40 MaltaCross waargh 2008-07-30
28588 Falk333 41 SchwarzRotGold hello :-) 2008-07-27
20581 Mercer 43 KingSlayers Congrats to Reszo on the 2500 ranking also! You and Sellsword have both set the bar very HIGH! 2008-07-26
25088 Santirod42 37 A.O_Republic_Army As some of you may know\comma there have been some problems with the Republic forums... I have done some "remodeling" and i would like to see if the issue is gone. please go to http://aorepublicarmy.theiforum.com/. thank you\comma SANTIROD42 2008-07-26

Signature URL

PHP Call: $aocon->getSignatureURL('king');
PHP Output: http://sig.aevumobscurum.com/sig/king.png

Map URL

PHP Call: $aocon->getMapURL(5537, 'longhaul');
PHP Output: http://map.aevumobscurum.com/longhaul-map/Map-5537.png

Clan Icon URL

PHP Call: $aocon->getClanIconURL('RoyalFamily');
PHP Output: http://clan.aevumobscurum.com/clanicon/RoyalFamily.png

Webstart URL

PHP Call: $aocon->getWebstartURL();
PHP Output: http://www.aevumobscurum.com/original/webstart/AevumObscurum.jnlp
Play AO

Tournament Picture URL

PHP Call: $aocon->getTournamentImageURL(7);
PHP Output: http://www.aevumobscurum.com/original/webstart/extra/tournaments/Tourney-7-Image.png

PHP Call: $aocon->getTournamentIconURL(7);
PHP Output: http://www.aevumobscurum.com/original/webstart/extra/tournaments/Tourney-7-Icon.png

News/Update Service

PHP Call: $aocon->getNewsBannerURL();
PHP Output: http://www.aevumobscurum.com/original/webstart/extra/AOAdBannerImage.png

PHP Call: $aocon->getNewsInfo();
PHP Output:
LINK=http://www.multiplayerhub.com