Index  | Recent Threads  | Unanswered Threads  | Who's Active  | Guidelines  | Search
 

Quick Go »
No member browsing this thread
Thread Status: Active
Total posts in this thread: 15
Posts: 15   Pages: 2   [ 1 2 | Next Page ]
[ Jump to Last Post ]
Post new Thread
Author
Previous Thread This topic has been viewed 2451 times and has 14 replies Next Thread
Former Member
Cruncher
Joined: May 22, 2018
Post Count: 0
Status: Offline
Reply to this Post  Reply with Quote 
Raw stats

Hey,

any idea on when you are going to release some kind of raw stats? I think when you would do that the real competition can begin and lots of members would join.

Grtz
Pconfig
[Dec 18, 2004 3:29:49 PM]   Link   Report threatening or abusive post: please login first  Go to top 
Former Member
Cruncher
Joined: May 22, 2018
Post Count: 0
Status: Offline
Reply to this Post  Reply with Quote 
Re: Raw stats

Can you say what raw stats would be?

thanks
[Dec 19, 2004 4:38:37 AM]   Link   Report threatening or abusive post: please login first  Go to top 
Former Member
Cruncher
Joined: May 22, 2018
Post Count: 0
Status: Offline
Reply to this Post  Reply with Quote 
Re: Raw stats

Raw stats are xml files or cvs files on wich some people could create stats for there on website. Way more extended with nice graphs and so on!
[Dec 19, 2004 9:28:51 AM]   Link   Report threatening or abusive post: please login first  Go to top 
David Autumns
Ace Cruncher
UK
Joined: Nov 16, 2004
Post Count: 11062
Status: Offline
Project Badges:
Reply to this Post  Reply with Quote 
Re: Raw stats

Good Idea pconfig
I've been trying to parse the data from the WCG site for the last week with no success. I think it's the ( and ) brackets around rank that is causing the problem. I would like to populate a database with the data then drive my site from that data producing realtime updating graphs and such like. Having a feed of the data in XML format would make that process a lot simpler.

Regards
Dave
----------------------------------------

----------------------------------------
[Edit 1 times, last edit by David Autumns at Dec 19, 2004 12:08:31 PM]
[Dec 19, 2004 12:08:01 PM]   Link   Report threatening or abusive post: please login first  Go to top 
Former Member
Cruncher
Joined: May 22, 2018
Post Count: 0
Status: Offline
Reply to this Post  Reply with Quote 
Re: Raw stats

Well i can do some html parsing but the problem is:

It's costs lots of time and there is no list of all members together, only a 5000 first members list!

I would like to know if there are going to be stats like this, cause otherwise i'll start parsing html. Can a project admin answer this?
----------------------------------------
[Edit 1 times, last edit by Former Member at Dec 19, 2004 12:25:15 PM]
[Dec 19, 2004 12:24:43 PM]   Link   Report threatening or abusive post: please login first  Go to top 
knreed
Former World Community Grid Tech
Joined: Nov 8, 2004
Post Count: 4504
Status: Offline
Project Badges:
Reply to this Post  Reply with Quote 
Re: Raw stats

Pconfig,

The only thing I can promise you at this point is that it will not be available within the near term. Writing your code to parse the HTML will be your best bet at this time.

We do read these suggestions and consider them so we appreciate it when you post them.

Sorry I can't give you an answer more to your liking.

knreed
----------------------------------------
[Edit 1 times, last edit by knreed at Dec 19, 2004 10:59:05 PM]
[Dec 19, 2004 10:57:33 PM]   Link   Report threatening or abusive post: please login first  Go to top 
Former Member
Cruncher
Joined: May 22, 2018
Post Count: 0
Status: Offline
Reply to this Post  Reply with Quote 
Re: Raw stats

Ok, thanks for that answer. I better start coding now smile
[Dec 20, 2004 6:13:42 AM]   Link   Report threatening or abusive post: please login first  Go to top 
Former Member
Cruncher
Joined: May 22, 2018
Post Count: 0
Status: Offline
Reply to this Post  Reply with Quote 
Re: Raw stats

This is a stats script, it is built of the member stats page for your time and so currently can only out put those stats, but here is the code:

<?php
$name = 'YOUR MEMBER NAME';
$handle = fopen("LINK TO YOUR TEAMS STATS", "r");
while (!feof($handle)) {
$contents .= fgets($handle, 4096);
}
fclose($handle);
$rank = explode("<a href='/stat/viewMemberInfo.do?userName=",$contents);
$ranks = -1;
foreach ($rank as $names)
{
$ranks++;
$find = strpos($names, $name);
if ($find !== false && $find == 0)
{
break;
}}
$trank = count($rank);
$trank = $trank - 1;
$page = explode("<a href='/stat/viewMemberInfo.do?userName=$name' class=\"contentLink\">",$contents);
$name = explode("</a></td>",$page[1]);
$data = explode('<td align="center"><span class="contentText">',$name[1]);
$name = $name[0];
$join = explode('</span>', $data[1]);
$join = $join[0];
$time = explode('</span>', $data[2]);
$time = $time[0];
$points = explode('</span>', $data[3]);
$points = $points[0];
$results = explode('</span>' , $data[4]);
$results = $results[0];
$name = trim($name);
$join = trim($join);
$time = trim($time);
$points = trim($points);
$results = trim($results);

echo "$name<br />$join<br />$time<br />$points<br />$results<br />$ranks of $trank";
?>


You must customize the first 2 lines, $name = your member name and the LINK to stats page is the link to the stats page for your team sorted by however you want it to produce the rank.
You must insert the stats page so your name can be seen and you are on the first page or it will mess up to ranking.
All the output variables are listed at the bottom
name - your member name
join - join date (if thier is a retire date it will list that too)
time - amount of cpu time for processing
points -your total points
results - number of returned results
ranks - your rank based on the sort method of the page link
trank - total number of people listed on that page (currently 2 teams have over 250 members and this number would be off for those two teams, if you are on one of those teams you will have to do some customizing...)

With some editing this script could easily be made to where it would grab the team rank and total members from the page so that you would not have to be on the first page and have only 1 page of members for it to be accruate.

At some point I may attempt to make a banner hosting web service if someone will give me the bandwidth for the images (as I know it can take a lot if many people start using it...) If you want to give the space let me know and I will get a script set up.
----------------------------------------
[Edit 3 times, last edit by Former Member at Dec 24, 2004 5:48:33 PM]
[Dec 24, 2004 5:39:01 PM]   Link   Report threatening or abusive post: please login first  Go to top 
Former Member
Cruncher
Joined: May 22, 2018
Post Count: 0
Status: Offline
Reply to this Post  Reply with Quote 
Re: Raw stats



This is what i made so far!
[Dec 24, 2004 6:58:44 PM]   Link   Report threatening or abusive post: please login first  Go to top 
Former Member
Cruncher
Joined: May 22, 2018
Post Count: 0
Status: Offline
Reply to this Post  Reply with Quote 
Re: Raw stats

I just updated my script to where it will read stats off the page so it nolonger has to read off page one and you don't have to be on page one. You do, however, have to be on the page you link it too.

<?php
$name = 'USERNAME';
$handle = fopen("PAGE URL", "r");
while (!feof($handle)) {
$contents .= fgets($handle, 4096);
}
fclose($handle);
$total = explode('Records </span><span class="contentTextBold">',$contents);
$start = explode('to',$total[1]);
$total = explode('</span><span class="contentText">- ',$start[1]);
$start = $start[0];
$total = explode('</span><span class="orangeText">',$total[1]);
$total = $total[0];
$rank = explode("<a href='/stat/viewMemberInfo.do?userName=",$contents);
$start = trim($start);
$trank = trim($total);
$ranks = $start-2;
foreach ($rank as $names)
{
$ranks++;
$find = strpos($names, $name);
if ($find !== false && $find == 0)
{
break;
}}
$page = explode("<a href='/stat/viewMemberInfo.do?userName=$name' class=\"contentLink\">",$contents);
$name = explode("</a></td>",$page[1]);
$data = explode('<td align="center"><span class="contentText">',$name[1]);
$name = $name[0];
$join = explode('</span>', $data[1]);
$join = $join[0];
$time = explode('</span>', $data[2]);
$time = $time[0];
$points = explode('</span>', $data[3]);
$points = $points[0];
$results = explode('</span>' , $data[4]);
$results = $results[0];
$name = trim($name);
$join = trim($join);
$time = trim($time);
$points = trim($points);
$results = trim($results);

echo "$name<br />$join<br />$time<br />$points<br />$results<br />$ranks of $trank";
?>

Here is a page that will give you results: http://klingmandesign.com/worldgrid.php?name=...er page)&team=team id
Example: http://klingmandesign.com/worldgrid.php?name=...ge=1&team=1S5XNJBR9N1


I used this an made my own stats banner...


It alternates (or should atleast the alternating is done with a random number generator so it might repeat the same banner sometimes...) between WhatPulse and World Community Grid so you might get the wrong image the first time.
----------------------------------------
[Edit 3 times, last edit by Former Member at Dec 26, 2004 12:26:13 AM]
[Dec 25, 2004 11:41:36 PM]   Link   Report threatening or abusive post: please login first  Go to top 
Posts: 15   Pages: 2   [ 1 2 | Next Page ]
[ Jump to Last Post ]
Post new Thread