Here is, a php file to run on a server. It is only a prototype to show some principles...
<?php
// Save the match datas
if (!empty($_POST)) {
// foreach( $_POST as $k=>$v) echo "$k => $v<br>";
$mtcNme=htmlspecialchars(str_replace(' ','_',trim($_POST["matchName"])));
$mtcTme=htmlspecialchars(preg_replace("`[^0-9]`",'',trim($_POST["strTime"])));
file_put_contents("matchfile".$mtcNme.".txt",$mtcTme);}
// Read the match data files
$mtc=array();
if ($hnd=opendir('./')){
while (false!==($fle = readdir($hnd))) if ($fle!='.' && $fle!='..' && substr($fle,0,9)=="matchfile"){
$mtc[]=$fle;
// echo "$fle<br>";
}
closedir($hnd);
}
$strTme='';$strMatch='';
foreach($mtc as $k=>$v) {//echo "$k $v<br>";
$strMatch.=substr($v,9,strlen($v)-13).'<br>Currrent minute : <span id="tme'.$k.'"></span><br><br>';
$cnt=file_get_contents($v);
$strTme.=','.$cnt;
}
$strTme='['.substr($strTme,1).']';
if (empty($strMatch)) $strMatch='No match in progress !';
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<meta name="generator" content="PSPad editor, www.pspad.com">
<title></title>
<style type="text/css">
html,body {font-family:Garamond;font-variant:small-caps;background-color:#ccc}
#frm {display:block;width:300px;margin:0 auto;padding:7px;background-color:#fc6}
#frm p{font-size:small;}
.npt {display:block;width:180px;}
.rgh {display:block;float:right}
#rsp {display:block;width:300px;margin:0 auto;padding:7px;background-color:#fff}
</style>
</head>
<body>
<form id="frm" action="<?php echo $_SERVER['PHP_SELF'] ?>" method="POST"><fieldset><legend>The management page</legend>
<p>Start time</p>
<p>Fill this form with the name of the match and click on this button at its beginning !<br><br>
<input type="hidden" name="strTime" id="strTime" value="">
<input class="npt" name="matchName" type="text" value="Barcelone vs Real Madrid"><input class="rgh" type="submit" value="Go !" onclick="return saveTime()"></p>
</fieldset></form>
<div id="rsp"><fieldset><legend>User's page</legend>
<p>During the match</p></label>
<p><?php echo $strMatch ?></p>
</fieldset></form>
<script type="text/javascript">
function saveTime(){
document.getElementById('strTime').value=new Date().valueOf();
return true;
}
var arrTme=<?php echo $strTme ?>;
function displayMinutes(){var i,scn,mnt;
now=new Date().valueOf();
for (var i=0;i<arrTme.length;i++) {
scn=Math.round((now-arrTme[i])/1000);
mnt=Math.round(scn/60);
scn%=60;
document.getElementById('tme'+i).innerHTML=(mnt<10?'0'+mnt:mnt)+':'+(scn<10?'0'+scn:scn);}
setTimeout(displayMinutes,1000);
}
if (arrTme.lenght!=0) displayMinutes()
</script>
</body>
</html>
But many progress are to made (I only display the seconds for short tests) ...
Good luck to enter (and update if necessary) the scores, half-times, added times and other extra times...