Salve ragazzi stò cercando di mettere un contatore nel mio sito, ma quando provo ad aggiornare ice sempre visite 0
ho uppatto nella stessa cartella il file txt, php e swf....
quest e il file nel php che non credo di capirlo bene
Codice PHP:
<html>
<head>
<title>contatore</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body bgcolor="#000000" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<?
function contatore($file_name) {
$fp = fopen($file_name, 'r');
$varcom = fread($fp, 255);
list ($nome, $valore) = split ('[=]', $varcom);
$buffer = $valore;
fclose($fp);
$buffer = (integer)$buffer +1;
$fp = fopen($file_name, 'w');
$buffer = "&numero=$buffer";
fwrite($fp, $buffer);
fclose($fp);
return $buffer;
}
$variabile=contatore("contatore.txt");
?>
<div align="center">
<table width="150" border="0" cellspacing="1" cellpadding="1">
<tr>
<td>[img]../../../shim.gif[/img]</td>
</tr>
<tr>
<td>
<div align="center"><font face="Verdana, Arial, Helvetica, sans-serif" size="2" color="#FFFFFF">Contatore
Flash</font></div>
</td>
</tr>
<tr>
<td>
<div align="center"><font face="Verdana, Arial, Helvetica, sans-serif" size="2" color="#FFFFFF"><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=4,0,2,0" width="150" height="80">
<param name=movie value="contatore.swf">
<param name=quality value=high>
<embed src="contatore.swf" quality=high pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="150" height="80">
</embed>
</object></font></div>
</td>
</tr>
</table>
</div>
</body>
</html>
c'è qualcosa id sbagliato lì?