• Some users have recently had their accounts hijacked. It seems that the now defunct EVGA forums might have compromised your password there and seems many are using the same PW here. We would suggest you UPDATE YOUR PASSWORD and TURN ON 2FA for your account here to further secure it. None of the compromised accounts had 2FA turned on.
    Once you have enabled 2FA, your account will be updated soon to show a badge, letting other members know that you use 2FA to protect your account. This should be beneficial for everyone that uses FSFT.

Folding stats

p3n

Gawd
Joined
Sep 29, 2002
Messages
631
Hey,

I use the stanford page and the extreme overclocking page to keep tabs on me and the team I was wondering how extreme get all the user information ?!

Basically im wanting to have my score / wu count on my site ... im guessing it'd be a fairly simple script but ive looked around abit and I cant see any details to where stats are kept ?!

:confused:
 
Originally posted by rkhands in reply to a similar question from me:

"
If you are just interested in the data for [H]ardOCP then use either the text file at:
http://vspx27.stanford.edu/teamstats/team33.txt
or the html file at
http://vspx27.stanford.edu/teamstats/team33.html

If you want all of the users for the whole project then you need to get the file at:
http://vspx27.stanford.edu/daily_user_summary.txt
or all of the teams at:
http://vspx27.stanford.edu/daily_team_summary.txt

These files are updated every 3 hours
"

Hope this helps. - Hito
 
Hito Bahadur said:
If you want all of the users for the whole project then you need to get the file at:
http://vspx27.stanford.edu/daily_user_summary.txt
your script (in sh, it's simple to rewrite this in an arbitrary language, and I'll do it if you ask)
Code:
#! /bin/sh
echo -en "Content-Type: text/plain\n\n"
grep p3n daily_user_summary.txt
and in your crontab:
Code:
3 0,3,6,9,12,15,18,21 * * * wget [url]http://vspx27.stanford.edu/daily_user_summary.txt[/url]
Sorry if you can't use, but I'm a linux guy. What can I say.
 
unhappy_mage said:
your script (in sh, it's simple to rewrite this in an arbitrary language, and I'll do it if you ask)
Code:
#! /bin/sh
echo -en "Content-Type: text/plain\n\n"
grep p3n daily_user_summary.txt
and in your crontab:
Code:
3 0,3,6,9,12,15,18,21 * * * wget [url]http://vspx27.stanford.edu/daily_user_summary.txt[/url]
Sorry if you can't use, but I'm a linux guy. What can I say.

Sorry, I'm still a windows wh0re. Working on getting back my knowledge of Unix based systems (learned on a VAX mainframe).
 
my buddy did a lil script cos he wants to code anything atm ... hes got it working from team33.txt but it takes a while to execute cos theres like 7k members and therefore takes a while, gonna try and make it stop when it finds me cos im placed 400 ~ which would take less time

is there a file with less detail ?!

if not gonna have to try a few diff ways of doing the hard work once :)
 
p3n said:
my buddy did a lil script cos he wants to code anything atm ... hes got it working from team33.txt but it takes a while to execute cos theres like 7k members and therefore takes a while, gonna try and make it stop when it finds me cos im placed 400 ~ which would take less time

is there a file with less detail ?!

if not gonna have to try a few diff ways of doing the hard work once :)
well, unless there's something odd going on, parsing 7k lines should be pretty fast... i use perl not php, but I have a script which reads ~5k directory entries, parses, sorts, and prints results in under 0.2 sec.

Here's the basic logic I'd use, I think php has pattern matching:
Code:
while ($line = getfromfile())
 {
  if $line =~ /p3n/
   break;
 }
parse further...
Just pseudocode. I'll whack something together and see what kind of results I get; this could be slower than I thought.
 
I think the delay is reading the file from http

I just want it to read the line with me on it and save rank, team rank, username, score, wu to variables

Problem is it has to check the file each time for a page with lots of hits inturn hits the txt files lots ....

basically i need a script to download the file locally every 3 hours or something ... that would prolly remove the delay

hmm .. this is alot more complicated than i first thought
 
This is my fetch script atm:

Code:
<?php

  /******************************************************
   * FOLDING@HOME SCRIPT								*
   * fold.fetchdata.php									*
   *													*
   * This script will read a the given text file and	*
   * extract the required stats.				 		*
   ******************************************************/
  

  /******************************************************
   * USER VARIABLES										*
   ******************************************************/
   
   $inputfile = "http://vspx27.stanford.edu/teamstats/team33.txt";  // User modifiable
   $searchstring = "nicklearse";									// User modifiable
   
   
  /******************************************************
   * FETCH DATA											*
   ******************************************************/
   
   $filelines = file($inputfile)							// Create array: filelines to store 
   	or die ("Could not open the file");						// each line of the input file
   	
   //$numlines = count ($filelines);						// Used for testing only.
   //print ("$numlines <br />");							// Used for testing only.
   
   foreach ($filelines as $line)
     if (preg_match("/$searchstring/", $line))
		 break;
 	   //print "$line <br />";								// Used for testing only.
 	   $exp_arr = explode("\t", $line);
 	   
 	   $overallrank 	= $exp_arr[0];
 	   $teamrank 		= $exp_arr[1];
 	   $username 		= $exp_arr[2];
 	   $points 			= $exp_arr[3];
 	   $wu 				= $exp_arr[4];
 	   $teamno 			= $exp_arr[5];
     
?>

If after adding the 'break' line it takes a while to come back with results, its defo the http interaction, so i need some method of downloading the file and/or only checking the values so often and storing them in mysql or something.
 
Is this running on a *nix box? It probably has crontabs set up if so... just add a line like this to yours:
Code:
3 */3 * * * wget [url]http://vspx27.stanford.edu/daily_user_summary.txt[/url]
If it's a windows box you're pretty much on your own. ;)
 
winblows :) :(

i'll work something out ... thanks for the help anywho
 
incase anyone else needs to keep their server winblows this works well for scheduling : www.wincron.com :)

in this case i've got it running a php script every 3 hours:

php:
Code:
<?php
$file = 'http://vspx27.stanford.edu/teamstats/team33.txt';
$newfile = 'team33.txt';

if (!copy($file, $newfile)) {
   echo "failed to copy $file...\n";
} else {
	echo "updated $file sucessfully!<br />";
	}
?>

in wincron user.tg:
Code:
# update
{
-name update
-start -inc 0 3 0 0
-action -print "folding update started..."
-action -spawn -detach c:\path\to\php.exe -q c:\path\to\update.php
-action -print "folding update complete"
}

happy folding :p
 
Back
Top