24.06.2017, 22:39 UTC+2  

You are not logged in.

Dear visitor, welcome to Battletracker.com. If this is your first visit here, please read the Help. It explains how this page works. You must be registered before you can use all the page's features. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.

 

Homey[GER]

Administrator

Posts: 9,499

Awards: 9 / 24

Thanks: 9408 / 105

1

14.10.2005, 17:03

XML Feeds now available for Webmasters

Hello!

Battletracker.com offers all kind of XML/RSS Feeds for your personal homepages and 3rd party applications. They allow you easily to get information about gameservers, players and clans and other things.

Most of those feeds can easily get found through your webbrowser. If you take a look at the Clanprofile, Playerprofile or GameServer Page you should notice that a little RSS/XML Button shows up in your browser URL bar. If you click it you will get redirected to the XML/RSS Feed.

[attach]16594[/attach]

For example we offer XML/RSS Feeds for Clans, which can be used on your clanhomepages to show their playerstats and online/offline status of your members.

Those feeds are currently seperated for each game that we are tracking here.

Some example Feed URL's:
http://battletracker.com/clanfeed/aao/*Your Clan-ID*/claninfo.xml
http://battletracker.com/clanfeed/aa3/*Your Clan-ID*/claninfo.xml
http://battletracker.com/clanfeed/bf2/*Your Clan-ID*/claninfo.xml
http://battletracker.com/clanfeed/bf2142/*Your Clan-ID*/claninfo.xml
http://battletracker.com/clanfeed/cod4/*Your Clan-ID*/claninfo.xml
http://battletracker.com/clanfeed/etqw/*Your Clan-ID*/claninfo.xml

You have to replace the CLAN ID Number in the link with the clan-id of your clan. You can now use this XML Feed for your homepage.

We also offer Gameserver XML/RSS feeds!

Some example URL's:
http://battletracker.com/aaoserver/206.1…/serverinfo.xml
http://battletracker.com/aa3server/194.1…/serverinfo.xml
http://battletracker.com/bf2server/193.1…/serverinfo.xml
http://battletracker.com/bf2142server/64…/serverinfo.xml
http://battletracker.com/cod4server/85.2…/serverinfo.xml
http://battletracker.com/cod5server/62.7…/serverinfo.xml
http://battletracker.com/etqwserver/193.…/serverinfo.xml

Let us know if you need XML/RSS Feeds for other information of our website or if you miss some information in those feeds. Feedback is always welcome!

Info:
If you check the comments from this thread you will already find some example scripts for all kind of homepages and other applications. Would be nice if you would post your websites that are using this feed here, so that I know what you guys are doing with it. And if you wrote some scripts to use this XML Feed and you want to share it with other clan webmaster here, please do it! Not everyone is an XML or coding expert.

You also might want to take a look at this *oudated* thread where a lot of information and example scripts were posted a long time ago:
[AAO] Betatest - Clan XML Feeds

This post has been edited 3 times, last edit by "Homey[GER]" (17.07.2009, 02:06)


425 registered users and 3 guests thanked already.

Users that thanked:

, #kenny, $[RD]$Mister_Rubby, (~TLD~)Maverik, )Cocaine(, *O*T*C*semorefred, -$t00p!d., -308-Vortex, -=DoW=- The_Ultim8, -=DRC=-Morpheus, -=GMB=-Dutch(V)4$T3R, -=JACK=-[WTF], -=Jason=-, -=QRF=-Cheese_King, -=T^A^=-Regent, -=WanderingTrooper=-, -=[IAC]=-Johnson, -=[R.A.C]=-LePoulpe, -={AA}=-Blackadder, -ARQ-StOrMz, -BAB^Blade, -Imp, -Ogz-madhouse, -RFN-johnny_be_good, -{DFW}-Black Hawk, ..::Rackly::.., .:EvL:.McClain, .nauTica;, .TsF.ProSh0oter, ///Bad/, 0perator*999*, 1756kahlua, 1Shot1Kill_{NavyVet}, 3D-co.GodGirl, 72sgtzero, sgt.DMW, Lam3, <[=TT=]>DVD-Dad, <[R]>Chaosuk83, <|3FSJ|>splash, = SDS = SDevoti, =222=OPFOR, =:WZ:=Marcchello, =DAF=_-wasgeht, =DFS=FOX, =DGL=:Bunkertor7:, =DWD=Jaffa, =EF= Doom.dk, =EK=Elite, =EWG=VV, =HJC=kistaki, =JBF=JOEYB, =JFFK=LesBear, =Old_Boys=Snap, =SAaR=<-NATAS<-, =SEX=SALEEN, =TPF=xEROhOUR, =US+BB=Bl@ckFalcon, =VZE=DarkWarlord, =XTC=Tat2u4life, AavikkoRotta, ABomB, Aeneas-2, AKMark, AlfieZA, alowicious, amergin, americanpower45, American_Idiot182, AngryC4Killer, anode, anthrax, anti-medic, ANTO.1966, asmackey, astro2k3, audiostatic, B2Media, Bahama.Llama, BaRmY-ken, baseballbrad3, Batesy, battleghost.BE, berlinost, bestvon, biggerbolderbetter, Bio*Viper, BlacKoPs.PT, bluenine, Bo7ex^z, Bobcat_SWE, BoekMan, Bondorf, borgso, botaao, Boxenluder, BrUnZaEvZ, Brut@l1s, bustmetal, BwanaBrian, C108.ScarfaceHH, c3|b00g, C@BL3R@T, Cablespider, cc//kazuma, Cerixus, chance99, Charcoal_Grey, Chief_14, chinesemaster006, Co2, Coach, commander12gray, Constantine**OF**, CoolbiO, CS_Ghost, Dalle, DaPickEL, DaPrince, DB^Dobermann, DeadmeaT, DeathToMe, Deebo05, deepnight, DeFalco, Dest!ny, DeVerlosserNL, Didzi, Dietcoke, Dillgraf, Dim_Mak, DIOH, direwolf, DITO, Dizfunkshunal, Dman~WCG~, Dobbs42, Don-Dinero, Donkbuster, doodlebug, DoorNail, Dosdip, drdeath, DrSex, duey121, DUH-Hateful-, elephant_machine, elite_marines, Estampida, EvilPropaganda, Evil_psyco, FBH_Terminator, Feertti, fegis, fika|sandeR, Flakstar, FMFConQueror, fochs, FosgateElite, Freguz, fsn|bullethole, Gallius, giTaz, GOA.Murster, godlike-mofo, GreenSniper, Grentz, greywolf2004, Griger, Grimmer, Gzz760, h4z4rd, HackUser, Hal, haydeN, Heavytanker, HitmanAoD, Hummerman, I*I_AtomicWelder_I*I, Intruder(FIN), Ir0nsh007er, ISD_BIGI, jakint, jaro_AUT, Jarven78, JdW, JDwoods[TeamATi], jeradam, JFFK_Hiryuu, Jombi, jondav, Joseph, Jsl1, Jukke, K!ngScorp, k-mouse, k1klass, KatanaGFR, kerani, kickkazama, Kimur, kisztian, Kmetsch, KNBig, koukou, Kukov, law17, Lewys, LILTTALK, liquidcocaine, Littlefat, looniestcrab, Lord_Arkhan, LTBQc-SURCOUF, luZk, Lynx01, M8DBrentwood, M8TRIXE, Maclobster, Maestro, Major-Jernhandske, MajorDistraction, Major_Day, makkie, Manimal T. Hunter, Markisha, Martini-Sniper, Maxxon, MissWiggly, MoB|NightStalker, MoD|Lilienbart, Molitov, morejohnniecans, Mr.Battery, Mr.Virus1512, MuLoO, Mystery, namnlost, nickMAD, Nico^APEX, Nightlight, NM156, Nodakie, NoxX, n_force13, Obrst.Cigarett, omghi2u[dF], ooPSeH, pastoor, pattons_ghost12, PBWolf, Peace-=Of-God=-, PhatHemmer, Philp90, picos, pimiento|=kyk=|, PissedNumlock, Plurk, Preacher, prins, PuTYi, PyroMani, Quickdeath1, R.I.P.Uli, r0bbeh, r4nd0mh3r0, RAD_RAPTOR, Rage(Dave), Rainmaker(UK), rangerwales, reckless75, Redwolfy, renderman, resupekka, richei, RiNo PiSKat, rizla+_uk, Roadkiller1, robertbob, Rock, RsF-Frosti, Runner, SAF.Sh1pWrEcK., Samaly, SAS_AgentSmith(AUS), Sauron[RAS], ScarFace*PR*, ScorpionAlpha01, SF][-RAVE, Sgt-Wrath, Sgt_Big_B, SHQ| Cougar, Shrimp, Sir Markus, SkAnKwOn, Skullienator, Sniper_ITA, sonic478, SpagatrixNL, SPC-Villatoro[75thR], SPECTORR, spinnman, SpoOnfi$h, stahlhammer89, stauffie, STiGGY, Stigmartyr, streetdaddy, STV.Nexus, superhacked, Svampus, SWP Disturbed, syscrash, Systemdevil, TAG__Welsh, Tanushiheadbash, Taz68, tazlamb, TBOMBER123, TC_dsniper, teebag|=kyk=|, tfolead, thechrizz, TheDonCT, thesamox, the|schoeli, ThisGeek, tim0n, Tomsen01, toozie, TOWER554, TR1GG3RH4PPY, trash288, Trucker, TVK_Satan, twix41, UA.Memphis, ubi_20, USAV-flyer, utexasCorpX, vampire_5122, vandalize, Vazze, Veiss, Vib!, VIP, ViperJuice~IFH~, Vosc2, warhawkz, Wario.Qc, warthy, Wedges wingman, Weedo[TeamATi], weiming, Weissman, wesintexas, wickedwillie, wildross, Windowmaker, WJW4rr3n, WND_Gravy, Wobbly, Wraiths_Hawkins, XX|BBC|XX, yatir15, yoyobricolo, Zeitsev, zEtTlAh, Zeus=18=, zodiak, Zorlofe, [-BSK-]eXodus, [-WoD-]^Hapoy_cz, [2R]GodGirl, [2STONED]Volkeracho, [702th]--Tux--, [AnnE]Tanke, [BNA]-Cyanide, [BnG]gardau, [BOBEC]W@rlock~Dk~, [BoTM]oz_viking, [BYMF]Mern, [CdW]Sixpack, [db@]Mogwai, [Decoy]_Boss_[DK], [DP]FDR, [Ep]Balrog, [ESF]Shaqan, [FoD]-PoSTMaN, [FPS]CF.Saw, [FTD]Beltazore, [GFC]Foot52swk, [guts]Bootman, [HED]ET@NL, [ICTU]NightHawk, [IDK]Governator, [IMCDNv]Molson, [Looney]Roadrunner, [LRRP]SSg_tedly, [LUX]codered, [MPC]Dante, [NHS]_Comes, [S:S]Joust, [SPECTRE]CSM.Buster, [SPQR]The Jackal, [STALAG13]Helga, [TFB]Gantz, [THuG]_MoD, [TRashED]Pythagorus, [TYR]Futelva, [Vodka]Martini, [ZiiP]Jester, [Z]Strekjen^, ^Dj0kr^, ^Qs.BarbAriaN, _DOA_GRUNGIR, {ABn}Robocop, {GD}Shmoo, |Acez|TLEX3, }DFA{theDog, }DFA{Vicious_Hippie, ~DiD~_StratManiac, ~FfG~Freelancer, ~SiR~ Bodybag, «ÐoлDolphinTuna

Posts: 1

Awards: 0 / 24

Thanks: 0 / 2

2

14.10.2005, 19:30

RE: This 16 users said THANK YOU for this thread

excellent work :D

Look at it this way, lack of feedback is the resoult of you doing such an excellent job on your tracker and the website, noone complains, rite? ;)

aC.50|B>

Private

Posts: 168

Awards: 0 / 24

Thanks: 529 / 1

3

14.10.2005, 19:43

great job with everything guys... do you have any intentions of doing something similar to this for gaming community websites? where it wont be clan based but rather based on individual user signups. i realize that would require more bandwidth, but i assume you would be caching it in a similar fashion to the sigs now, so it really wouldnt be much more load than that is already.

Great job again guys.

[667th] Mavrck

Private First Class

Posts: 156

Awards: 0 / 24

Thanks: 8 / 2

4

14.10.2005, 20:00

I put my clan ID in and it doesn't work.

http://bf2tracker.com/livefeed/xml_clanp….php?clanid=844

Posts: 95

Awards: 0 / 24

Thanks: 0 / 4

5

14.10.2005, 22:46

Looks like it worked fine to me.

XML generates a file with the information you want in it. Then you decide HOW you want it designed.

Unfortunately, that is all I know about it. (I am going to be one of those guys that needs help with this)... 8)
"I like a man who grins when he fights" ~ Sir Winston Churchill

~cn-calo

Recruit

Posts: 1

Awards: 0 / 24

6

14.10.2005, 23:14

WoW, awesome stuff!

I was wondering if you are thinking of releasing player stats xml feeds as well.

If see that you are going to require authentication to your webservice, you could also include player stats for that clan only? (Pwetty Please:))

So a clan within their site could only call the webservice and display information for their clan players. If we have to authenticate with a clanid and password that would secure your xml site from massive requests as well as not getting other people trying to clone your site and using you data. If I had access to our data I could create cool sigs for my clan, flash animations, etc.

Don’t get me wrong, the fact that you have released any type of xml feed is wonderful and it is more than anyone would even imagine. But now that is here, "The Sky is the Limit" :)

This post has been edited 2 times, last edit by "~cn-calo" (14.10.2005, 23:16)


Homey[GER]

Administrator

Posts: 9,499

Awards: 9 / 24

Thanks: 9408 / 105

7

14.10.2005, 23:51

EA/GameSpy will make PlayerStats available on their new pulic stats servers very soon. I don't think I have to do that. I would just redirect all the traffic through our webservers, because I also get my data from that stats server from EA (currently beta test)

I am more interested to show the stats that are not available in the XML Feed of EA/GameSpy. Like Clanstats, clan rankings, clan server stats, player online/offline status and player-stats and infos that are not available in the data of EA/GameSpy.

Zorlofe

Recruit

Posts: 1

Awards: 0 / 24

Thanks: 0 / 1

8

15.10.2005, 01:24

XML Feed

Nice, this is exactly the kind of thing I've been wanting to put on our clan website! Looking forward to the finished product and I thank all of you involved in this website for all your hard work! We appreciate you! ;)
The Only Audience That Matters Is God!
www.crossroadscomputerclub.net

ripper40

Recruit

Posts: 5

Awards: 0 / 24

9

15.10.2005, 01:49

RE: XML Feed now available for Clan Webmasters

I am not much of a web master to start with but I have taken the link input my clan ID, inserted it my website code and cant seem to get it working. I am sure I am doing something wrong.
When I clicked on the link from an early mistake I made with it it did give me info. in the XML file. I seem to be having trouble displaying what it gives me. Do you have additional details to get it to work?

Thanks

Ripper40

ripper40

Recruit

Posts: 5

Awards: 0 / 24

10

15.10.2005, 02:13

your amaizing script

Well it helped enough to find out I cant use php files since I am getting free hosting :wacko: but anyway thanks for your quick reply. Did anyone get it going I would love to see what it looks like on a web page?

Thanks again and good work.

Ripper40

DrSex

Recruit

Posts: 7

Awards: 0 / 24

Thanks: 0 / 6

11

15.10.2005, 02:31

it looks as if neither system work...im trin it now but gettin nothin yet...

http://bfserver.com/bf2tracker_clanprofile.php

EDIT: it works if i hit #1 but if i enter my clan # 3294 it wont work...???

http://bf2tracker.com/bf2_clanprofile.php?clanid=3294

This post has been edited 1 times, last edit by "DrSex" (15.10.2005, 02:33)


ripper40

Recruit

Posts: 5

Awards: 0 / 24

12

15.10.2005, 02:34

Duh on my part

OK cool thanks again.

Ripper40

Posts: 48

Awards: 0 / 24

13

15.10.2005, 02:46

nice 1 homey works a treat,
http://www.cym-clan.co.uk/bf2tracker/clanprofile.php

i was going to look at maybe creating this in a block, how hard is this ?

i have tried the following adding at the beginning of the file

if (eregi("block-bf2clanprofile.php", $PHP_SELF)) {
Header("Location: index.php");
die();
}


and then i read somehwre you had to use

$content. =

to display the info as opposed to ECHO in a block.

but it seems to just be screwing my website up at the moment when i enable the block lol, i will post if i get any joy. Or if anyone has any ideas ??

This post has been edited 2 times, last edit by "[CYM]Jack_Bauer" (15.10.2005, 02:48)


Homey[GER]

Administrator

Posts: 9,499

Awards: 9 / 24

Thanks: 9408 / 105

14

15.10.2005, 02:53

That's correct.

Replace this line:

Source code

1
 echo "<img border=\"0\" src=\"./bfrankimages/ranksmall_$playerrank.gif\" width=\"16\" height=\"16\"> <img border=\"0\" src=\"./$statuspic\" width=\"42\" height=\"16\"> <a target=\"_blank\" href=\"$playerurl\"><font size=\"2\" color=\"#000000\">$playername</font></a><br>";


with this line

Source code

1
 $content .= "<img border=\"0\" src=\"./bfrankimages/ranksmall_$playerrank.gif\" width=\"16\" height=\"16\"> <img border=\"0\" src=\"./$statuspic\" width=\"42\" height=\"16\"> <a target=\"_blank\" href=\"$playerurl\"><font size=\"2\" color=\"#000000\">$playername</font></a><br>";


Also possible that you don't need all the \ in your scripts. Could probably cause some problems now ...

Then use this:

Source code

1
$content .= "<img border="0" src="./bfrankimages/ranksmall_$playerrank.gif" width="16" height="16"> <img border="0" src="./$statuspic" width="42" height="16"> <a target="_blank" href="$playerurl"><font size="2" color="#000000">$playername</font></a><br>";


Then you can use the $content variable somwhere on your homepage to display the playerlist. And you should disable all the other ECHOS in the script if you include that script into your scripts.

----------------
----------------

Quoted

EDIT: it works if i hit #1 but if i enter my clan # 3294 it wont work...???


Try it again. I fixed a problem in our scripts that caused a bad page for you. And you have to replace the clan id in your PHP Script (first line).

Homey[GER]

Administrator

Posts: 9,499

Awards: 9 / 24

Thanks: 9408 / 105

15

15.10.2005, 03:01

Quoted

i was going to look at maybe creating this in a block, how hard is this ?


Should not be very hard ...

Do you have some kind of example for a module and how they look? Then I probably can tell you how a player-stats module should look :)

Posts: 48

Awards: 0 / 24

16

15.10.2005, 03:14

all i was trying to do was pull that existing example code u gave earlier into a block.

this is what i have so far

Source code

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
<?php
if (eregi("block-bf2clanprofile.php", $PHP_SELF)) {
Header("Location: index.php");
die();
} 

$clanid="280";

function startTag($parser, $name, $attrs) {
 global $stack;

 $tag=array("name"=>$name,"attrs"=>$attrs); 
 array_push($stack,$tag);
}

function cdata($parser, $cdata) {
 global $stack,$i;
  
	if(trim($cdata)) {

		$stack[count($stack)-1]['cdata']=$cdata;   
	}

}

function endTag($parser, $name) {
 global $stack;

 $stack[count($stack)-2]['children'][] = $stack[count($stack)-1];
 array_pop($stack);
}


// Parse XML

$stack = array();
$claninfo = array();
$clanstats = array();
$playerstats = array();

$xml_parser = xml_parser_create();
xml_set_element_handler($xml_parser, "startTag", "endTag");
xml_set_character_data_handler($xml_parser, "cdata");

$xmllink="http://bf2tracker.com/livefeed/xml_clanprofile.php?clanid=$clanid";
$data = xml_parse($xml_parser,file_get_contents($xmllink));
if(!$data) die(sprintf("XML error: %s at line %d", xml_error_string(xml_get_error_code($xml_parser)), xml_get_current_line_number($xml_parser)));

xml_parser_free($xml_parser);


// Get Data

 // Get Clan Profile Data
 for($i = 0; $i < sizeof($stack[0][children][0][children]); $i++) {
  $valname=$stack[0][children][0][children][$i][name];
  $claninfo[$valname]=$stack[0][children][0][children][$i][cdata];
 }

 // Get Clan Stats Data
 for($i = 0; $i < sizeof($stack[0][children][1][children]); $i++) {
  $valname=$stack[0][children][1][children][$i][name];
  $clanstats[$valname]=$stack[0][children][1][children][$i][cdata];
 }

 // Get Player Data
 for($i = 0; $i < sizeof($stack[0][children][2][children]); $i++) {
  for($x = 0; $x < sizeof($stack[0][children][2][children][$i][children]); $x++) {
   $valname=$stack[0][children][2][children][$i][children][$x][name];
   $value=$stack[0][children][2][children][$i][children][$x][cdata];
   if($valname=="PLAYERID") $pid=$value;
   $playerstats[$pid][$valname]=$value;
  }
 }

// Now we have 3 arrays with all stats and infos
// print_r($claninfo);
// print_r($clanstats);
// print_r($playerstats);

// Display Clan Info
$content .= "<b>Clan Info:</b><br>\n";

foreach($claninfo as $key => $value) {
$content .= "$key: $value<br>\n";
}


// Display Clan Stats
$content .= "<br><br><b>Clan Info:</b><br>\n";

foreach($clanstats as $key => $value) {
$content .= "$key: $value<br>\n";
}

// Display Player Stats
$content .= "<br><br><b>Player Stats:</b><br>\n";

foreach($playerstats as $key => $value) {
 $playername=$playerstats[$key][PLAYERNAME];
 $playerurl=$playerstats[$key][PLAYERSTATSURL];

 if($playerstats[$key][PLAYERRANK]!="") $playerrank=$playerstats[$key][PLAYERRANK];
 else $playerrank=0;

 if($playerstats[$key][PLAYERSTATUS]=="1") $statuspic="ponline.gif";
 else $statuspic="poffline.gif";

  $content .= "<img border=\"0\" src=\"./bfrankimages/ranksmall_$playerrank.gif\" width=\"16\" height=\"16\"> <img border=\"0\" src=\"./$statuspic\" width=\"42\" height=\"16\"> <a target=\"_blank\" href=\"$playerurl\"><font size=\"2\" color=\"#000000\">$playername</font></a><br>";
}
?>



The block displays ok but it only displays this

BF2 Clan Profile

Clan Info:


Clan Info:


Player Stats:


what have i done wrong for it not to display the stats ??

This post has been edited 1 times, last edit by "[CYM]Jack_Bauer" (15.10.2005, 03:15)


Posts: 48

Awards: 0 / 24

17

15.10.2005, 03:17

sorry homey the color was a bit shocking when i saved the post lol

ripper40

Recruit

Posts: 5

Awards: 0 / 24

18

15.10.2005, 03:23

still working on it

Homey I havent given up yet, I am still tinkering around with it.

http://mvcclan.bravehost.com/ <- Heres the very new site

I wanted to add your script in the Bio page. The site hasnt been up a week yet. Its that new. Again I wanted to say thanks for your help...most places dont even bother to respond.

So thanks again

Ripper40

Homey[GER]

Administrator

Posts: 9,499

Awards: 9 / 24

Thanks: 9408 / 105

19

15.10.2005, 03:25

With only HTML available on your server, it will be very hard / impossible :cry:

Posts: 48

Awards: 0 / 24

20

15.10.2005, 03:28

its a block not a module, well the ye call them blocks in phpnuke anyways the address is

http://www.cym-clan.co.uk/index.php

and its on the left hand side, yeh i am using that code i posted in at the moment and have replaced all the echos with

$content .=

you should be abel to see what i have :S