Who can make a php script to read the file userstats.dat.
Advance thanks for your help.
username (string, linebreak afterwards) usgn id (32 bit signed integer) score (32 bit signed integer) frags (32 bit signed integer) deaths (32 bit signed integer) time on server in seconds (32 bit signed integer)
<?php function inte($a, $b, $c, $d){ return $a*16777216+$b*65536+$c*256+$d; } function StatsRank($usgn){ $t = fopen('userstats.dat', 'rb'); $line = fread($t, filesize('userstats.dat')); fclose($t); $line = substr($line, 17); } ?>
<?php $filename="dir/to/stats/userstats.dat"; function to_intl($lpstr) { 	return ord($lpstr[0])+ord($lpstr[1])*256+ord($lpstr[2])*65536+ord($lpstr[3])*16777216; } function GetUserStatRank($usgn) { 	global $filename; 	$t=fopen($filename,"rb"); 	if(!$t) die("Cannot open userstats.dat"); 	$a=fread($t,filesize($filename)); 	fclose($t); 	$a=substr($a,18); 	$temp=[ 		"isexists" => false, 		"score" => 0, 		"frags" => 0, 		"deaths" => 0, 		"time" => 0 	]; 	while(true) { 		$newline=strpos($a,"\n"); 		if($newline===false) break; 		$a=substr($a,$newline+1); 		if(to_intl($a)==$usgn) { 			$temp["isexists"]=true; 			$a=substr($a,4); 			$temp["score"]=to_intl($a); 			$a=substr($a,4); 			$temp["frags"]=to_intl($a); 			$a=substr($a,4); 			$temp["deaths"]=to_intl($a); 			$a=substr($a,4); 			$temp["time"]=to_intl($a); 			break; 		} else { 			$a=substr($a,21); 		} 	} 	return $temp; } ?>