DF Ownership on my Website

G

galdora

Guest
Hi all you XML/PHP Gurus

I've enjoyed tinkering about the with XML that Mythic and GOA provide. Got guild roster, crafters, alliance data and such working.

So here's a question. Some of you have got who has the DF entrance on your pages. I understand that the realm with the most keeps has it, but ....

If, then the page is loaded, if the highest number of keeps between more than one realm is tied, how do you know who had the largest number of keeps before and so still has the DF entrance?

Come on guys, give me a tip on how you solved it.

Thanks for any help you can be.
 
E

Eblessair

Guest
What you could do, is every time one realm has more keeps than another, write the name of that realm to a file.
then, when you have a draw between realms, simply read from that file the name of the realm, and there you have your df owner :)

as to how to code it, i cant help you there, im more of a perl person ;)
 
F

Flimgoblin

Guest
You can do it to a level of accuracy...

if you get the xml every 5m you can keep track of who is winning..

however if, say, albion is winning by one keep when you take the snapshot...

then 2 minutes later, hibs take two albion keeps, putting them one again, opening DF,

a minute after that, albs take a different hibernian keep, putting everything equal...

Your site then gets another download and goes 'ooh it's even... so albion must still be in control'.

Chances of it being wrong decrease with the interval between xml grabs... however you could be incredibly unlucky and have 3 keeps go within seconds of each other :)

Tis all a matter of what you're going to accept as 'reasonably unlikely'.
 
G

galdora

Guest
Thanks for your help guys. That was what I was thinking of doing.

The period of update is not too much of an issue, the XML keep data is not updated that regularly.

Ok, lets start coding. :clap:
 

Users who are viewing this thread

Top Bottom