|
|
Bienvenue - Nous sommes
le
.
Il y a actuellement
/* -------------------------------------------------------- */
/* Script Compteur Temps Réel */
/* Auteur: Matthieu Chevalier */
/* Web-Site: http://matthieu.chevalier.free.fr/ */
/* Email: matthieu.chevalier@free.fr */
/* */
/* -------------------------------------------------------- */
/* Valeur à modifier pour appliquer à votre site */
$tempmax = 180; // temps au bout duquel le visiteur n'est plus compté présent s'il ne racharge pas une page. (en secondes)
$userfile="data/visitonline.dat"; // nom de votre fichier de comptage(recommandé de ne pas le changer)
$tempfile="data/tempfile.dat"; //nom du fichier temporaire
/* Ne plus rien modifier en dessous de cette ligne */
$sec = time();
$expire=$sec + $tempmax;
$ipvisit="$REMOTE_ADDR";
function substrcount($haystack, $needle) {
$offset=0;
$i = 0;
$counter = 0;
while ($i==0) {
$longueur = strlen($haystack);
$position=strpos($haystack,$needle,$offset);
if ($position && ($offset + strlen($needle)) <= $longueur) {
$offset = $position+strlen($needle);
$counter++;
} else {
$i++;
}}
return $counter;
}
$cont=fopen("$userfile","r+");
$contenu="";
while (!feof($cont)) {
$suite=fgets($cont, 4096);
$contenu.="$suite";
}
fclose($cont);
$nbreligne=substrcount("$contenu","\n");
$visit = explode("\n",$contenu);
$j=0;
$ligneecrite="$ipvisit|$expire\n";
$tempfi=fopen("$tempfile","a+");
fwrite($tempfi,"$ligneecrite");
fclose($tempfi);
$nbreonline++;
while ($j < $nbreligne){
$idvisit=explode("|",chop($visit[$j]));
if ($idvisit[0] != $ipvisit){
if ($idvisit[1] >= $sec){
$ligneecrite="$idvisit[0]|$idvisit[1]\n";
$tempfi=fopen("$tempfile","a+");
fputs($tempfi,"$ligneecrite");
fclose($tempfi);
}}
$j++;
}
copy("$tempfile","$userfile");
$conte = fopen("$userfile","r");
$contenu2 = "";
$contenu="";
while (!feof($conte)) {
$suite2=fgets($conte, 4096);
$contenu2.="$suite2";
}
fclose ($conte);
$nbreligne2 = substrcount("$contenu2","\n");
$nbreonline = "$nbreligne2";
$testtemp=fopen("$tempfile","w+");
fseek($testtemp,0);
fputs($testtemp,"");
fclose($testtemp);
if ($nbreonline==1){$afficher="$nbreonline personne";}
if ($nbreonline>1){$afficher="$nbreonline personnes";}
if ($voir=="js"){
print "document.write('".$afficher."');";
}
if ($voir=="php"){
echo("$afficher");
}
if ($voir=="no"){
}
?> sur le site.
Il y a eu
include("compteur.php");
?>
pages vues. |
|
|
|
Fields of Gold
Waiting in the fields of gold
She lies amongst the flowers
Deep into her mind
The sun keeps striking in the sky
And the beauty of her face
You all like to embrace
Hearing singing birds she took
She wished she had the powers
Fly off, leave behind
And see the world from very high
In her eyes, color of the sea
Dance the waves leading to the sea
Oh rejoice, now the time is near
The truth will soon appear
Move with us towards the rising sea
Where music is the queen
Then you'll find your freedom
Then you'll find your peace
Waiting in the fields of gold
She lies amongst the flowers
Deep into her mind
The sun keeps striking in the sky
And the beauty of her face
You all like to embrace
Hearing singing birds she took
She wished she had the powers
Fly off, leave behind
And see the world from very high
In her eyes, color of the sea
Dance the waves leading to the sea
Oh rejoice, now the time is near
The truth will soon appear
Move with us towards the rising sea
Where music is the queen
Then you'll find your freedom and your peace
You know what I mean?
You must know what I mean
Gracious, it's coming nearer
Don't worry take your time
Wait for a glance
You will see the light
Freedom, freedom, peace, peace
|