Realm data feeds

Questions and discussions on development tools for WarcraftRealms
User avatar
Rollie
Site Admin
Posts: 4783
Joined: Sun Nov 28, 2004 11:52 am
Location: Austin, TX
Contact:

Realm data feeds

Post by Rollie »

Please post all your questions and feedback on the <a href='http://www.warcraftrealms.com/dataexport.php'>Realm Data Export</a> feature in this thread.
phpbb:phpinfo()

InuTracy
Posts: 3
Joined: Thu Jan 13, 2005 7:31 pm

Post by InuTracy »

It's freaking hard to use! Is there a tutoriol to help? There is no clear way to use this, at all and I really want to display it on my web site for my guild.
Image
<a href="http://www.the-valiant.com/InuTracy/Pic ... e.jpg">Hl2 > H2? Decide yourself</a>

Khael
Posts: 8
Joined: Sat Feb 05, 2005 6:27 am

Easy

Post by Khael »

I found it extremely easy to use ;)

I mean it doesnt get much easier when you are given a comma separated csv file, updated every hour.

This shit rocks, thank you Rollie & Co.
Khael[SUN]
GUILD OF SUN - slaying carebears since 1873
Webmaster: http://www.guildofsun.com

Tarasque
Posts: 1
Joined: Wed Feb 09, 2005 5:10 pm
Location: Panama
Contact:

Post by Tarasque »

This feature seems interesting. I was looking something similar, like having the realm status (online/offline) that could be viewed from my site, something like a few fansites have.

Anyways, it would be interesting to use the data, but a guide or tutorial would rock ;) I'm more into design than programming :roll:
Image

User avatar
Rollie
Site Admin
Posts: 4783
Joined: Sun Nov 28, 2004 11:52 am
Location: Austin, TX
Contact:

Post by Rollie »

The realm data feeds I provide give basic realm statistical information, not if the realm is currently up or not.

The realm data can be retrieved in the same manner as posted in the guild export thread. You would just need to point the save file at the realm data files instead of the guild files.
phpbb:phpinfo()

Kitaka
Posts: 9
Joined: Fri Feb 11, 2005 11:39 am

Post by Kitaka »

the guild data is well, but is there any way to show the sex?
i plan a little img for all Chars :wink: and for that i need the gender

User avatar
Rollie
Site Admin
Posts: 4783
Joined: Sun Nov 28, 2004 11:52 am
Location: Austin, TX
Contact:

Post by Rollie »

Unfortunately there is no way to determine gender (as far as I know).
phpbb:phpinfo()

Keronos

Broken ?

Post by Keronos »

This seems to be broken at the moment ?

I get zero byte files from the links :(

User avatar
Rollie
Site Admin
Posts: 4783
Joined: Sun Nov 28, 2004 11:52 am
Location: Austin, TX
Contact:

Post by Rollie »

ah yeah, I need to do a little work since the move to get it back 100%. Gimme a day or so =)
phpbb:phpinfo()

Keronos

Post by Keronos »

possible to put a sample file up for the meanwhile ?

thisKman

Post by thisKman »

I have read the terms of use, but Guild data processing is still unclear. Can I use the the link like a file? Is it allowed to use it like this (in PHP):
$data_array = file("http://www.warcraftrealms.com/exports/g ... comes_here"); ?

User avatar
Rollie
Site Admin
Posts: 4783
Joined: Sun Nov 28, 2004 11:52 am
Location: Austin, TX
Contact:

Post by Rollie »

You need to download the file periodically instead of pulling it each time the page is accessed.
phpbb:phpinfo()

thisKman

Post by thisKman »

The method is that I download that file once a day, and use my stored one. Is it ok then?

User avatar
Rollie
Site Admin
Posts: 4783
Joined: Sun Nov 28, 2004 11:52 am
Location: Austin, TX
Contact:

Post by Rollie »

Yup, that'd be great =)
phpbb:phpinfo()

thisKman

Post by thisKman »

Ok. Thx! I will post again if the code is done.

Keronos

Post by Keronos »

It's still broken though ?

User avatar
Rollie
Site Admin
Posts: 4783
Joined: Sun Nov 28, 2004 11:52 am
Location: Austin, TX
Contact:

Post by Rollie »

Shouldn't be! I fixed it a few days ago!
phpbb:phpinfo()

thisKman

Post by thisKman »

Finally the code is done, so my Guild data processor is working! As agreed it gets the data once a day from warcraftrealms.com, it makes a copy of it then uses the stored one till the next refresh time comes (after 24 hours). Here it is (without the HTML code):

Code: Select all


$now = time&#40;&#41;;

//Setting up the variables
$date_file_name = "some_datefile_name.temp";
$date_file = file&#40;"$date_file_name"&#41;;

$next_day = $date_file&#91;0&#93; + 24*3600;

$link = "http&#58;//www.warcraftrealms.com/exports/guildexport.php?guildid=guild_id";
$filename = "some_file_name.dat";
$title = "Guild_name";

if&#40;$now > $next_day&#41;
&#123;
                $file = $filename;
                $d_file = file&#40;"$link"&#41;;

	$open_file = fopen&#40;$file, "w"&#41;;

	for&#40;$i = 0;$i < count&#40;$d_file&#41;;$i++&#41;
	&#123;
		fwrite&#40;$open_file, "$d_file&#91;$i&#93;"&#41;;
	&#125;

	fclose&#40;$open_file&#41;;


	//Updating the stored date
	$open_file = fopen&#40;"$date_file_name", "w"&#41;;
	fwrite&#40;$open_file, "$now"&#41;;
	fclose&#40;$open_file&#41;;
&#125;else&#123;
               $d_file = file&#40;"$filename"&#41;;
&#125;

...Some html code...

//Printing out the member data
for&#40;$i = 1;$i < count&#40;$d_file&#41;;$i++&#41;
&#123;
	$line = explode&#40;",", $d_file&#91;$i&#93;&#41;;

	list&#40;$month, $day, $year&#41; = explode&#40;"/", $line&#91;4&#93;&#41;;

	echo "the data in the format you like &#40;$line&#91;0..5&#93;&#41;";
&#125;

//The first line contains no member data
$member_count = count&#40;$d_file&#41; - 1;

echo "member count with the format you like";

...Some html code...
That's it. Not too much but it works : ))

Keronos

Post by Keronos »

Rollie wrote:Shouldn't be! I fixed it a few days ago!
But isn't... All of the links for SERVER feeds I tried give zero byte files.

Keronos

Post by Keronos »

To test this, try this:

Code: Select all

gzopen&#40;'http&#58;//www.warcraftrealms.com/exports/download.php?fname=EU-Emerald%20Dream.csv.gz','r'&#41;
I have no trouble opening the guild files, but server files are down

Locked