Unable to open remote file.\n"; exit; } $i=0; while (!feof ($file)) { $line = fgets ($file, 1024); if(strstr($line,"
")) { $line = fgets ($file, 1024); eregi("
(.*)
(.*)
", $line, $out); // eregi("
(.*)
", $line, $out); $ud[$i]["login"]=$out[2]; $line = fgets ($file, 1024); eregi("
(.*)
", $line, $out); $ud[$i]["joined"]=$out[1]; $line = fgets ($file, 1024); eregi("
(.*)
", $line, $out); $ud[$i]["cputime"]=$out[1]; $line = fgets ($file, 1024); eregi("
(.*)
", $line, $out); $ud[$i]["points"]=$out[1]; $line = fgets ($file, 1024); eregi("
(.*)
", $line, $out); $ud[$i]["results"]=$out[1]; $i++; } } fclose($file); for($i=0;$i
1)?"s":"")." "; if($td) $ud[$i]["cputime"].=$td." day".(($td>1)?"s":"")." "; if($th) $ud[$i]["cputime"].=$th." hour".(($th>1)?"s":"")." "; if($tm) $ud[$i]["cputime"].=$tm." minute".(($tm>1)?"s":"")." "; if($ts||(!$ty&&!$td&&!$th&&!$tm)) $ud[$i]["cputime"].=$ts." second".(($ts>1)?"s":""); */ // joined date transformation $jm=sprintf("%02d",substr($ud[$i]["joined"],0,2)); $jd=sprintf("%02d",substr($ud[$i]["joined"],3,2)); $jy=sprintf("%d",substr($ud[$i]["joined"],6,4)); $ud[$i]["joined"]=$jy."-".$jm."-".$jd; $ud[$i]["results"]=str_replace(",","",$ud[$i]["results"]); $ud[$i]["points"]=str_replace(",","",$ud[$i]["points"]); /* // pouët.net account check $query="SELECT id,nickname,avatar FROM users WHERE udlogin='".$ud[$i]["login"]."'"; $result=mysql_query($query); if(mysql_num_rows($result)) { $ud[$i]["id"]=mysql_result($result,0,"id"); $ud[$i]["nickname"]=mysql_result($result,0,"nickname"); $ud[$i]["avatar"]=mysql_result($result,0,"avatar"); } */ } for($i=0;$i
".$query."
"); if(mysql_num_rows($result)) { $id=mysql_result($result,0); $query="UPDATE ud SET "; $query.="joined='".$ud[$i]["joined"]."',"; // str_replace(",","",$ud[$i]["cputime"]); $query.="results='".$ud[$i]["results"]."',"; $query.="points=".$ud[$i]["points"].","; // str_replace(":","",$ud[$i]["results"]); $query.="cputime='".$ud[$i]["cputime"]."' "; $query.="WHERE id=".$id; } else { $query="INSERT ud SET "; $query.="login='".$ud[$i]["login"]."',"; $query.="joined='".$ud[$i]["joined"]."',"; $query.="results=".$ud[$i]["results"].","; $query.="points=".$ud[$i]["points"].","; $query.="cputime='".$ud[$i]["cputime"]."'"; } mysql_query($query); // print("this: ".$query."
"); } ?>
members
joined
results
points
cputime
for($i=0;$i
print($ud[$i]["login"]); ?>
print($ud[$i]["joined"]); ?>
print($ud[$i]["results"]); ?>
print($ud[$i]["points"]); ?>
print($ud[$i]["cputime"]); ?>
endfor; ?>
mysql_close($db); ?>