$database="sergi5_com";
$link = @mysql_connect("localhost", "mysql", "sergi5ql");
@mysql_select_db("sergi5_com");
$dat=date( "Y-m-d-H-i-s" );
$idcompteur="0";
$TableRepcompteur=mysql_query("SELECT * FROM Compteur");
$compteur_numero = mysql_result($TableRepcompteur, $idcompteur , "NUMERO");
$texte_numero=1+$compteur_numero;
$modifs="NUMERO='$texte_numero'";
mysql_query("UPDATE Compteur SET $modifs WHERE NUMERO='$compteur_numero'");
$numeronew=$compteur_numero%10000;
$ipnamou=getHostByAddr($_SERVER['REMOTE_ADDR']);
$agent=$HTTP_USER_AGENT;
$page=$SCRIPT_FILENAME;
$newplace=$texte_numero-10000;
if ($texte_numero<=10000) {
$instruction="INSERT INTO Statistiques VALUES ('$texte_numero','$dat','$ipnamou','$page','$HTTP_REFERER','$agent')";
mysql_query( $instruction);
} else {
$modifications="NUMERO='$texte_numero', DATE='$dat', NAME='$ipnamou', PAGE='$page', REFERENCE='$HTTP_REFERER', AGENT='$agent'";
mysql_query("UPDATE Statistiques SET $modifications WHERE NUMERO='$newplace'");
}
?>
if (ereg("oogle",$ipnamou) || 1==0 ) { ?>
Monaco Grand Prix
Know you can browse the web. Thank you.
Monaco Formula 1 Grand Prix 2004 2005: Monaco Grand Prix
Rent an apartment in La Baule: La Baule
Or use a google ads:
} else { ?>
intelligence.sergi5.com
$database="sergi5";
$ownerEmail="sergi@sergi5.com";
$table="guess";
$table2="GUESS2";
?>
if ($datedebut>0 ) {
$nbcoups=strlen($serie);
if ($nbcoups>0 ) {
echo("You have played during:");
$duree=0.1;
$duree=date(time()-$datedebut);
//$duree=settype($duree,"double");
//$nbcoups=settype($nbcoups,"double");
$moyenne=$duree/$nbcoups;
echo($duree);
echo(" seconds
Number of key pressed:");
echo($nbcoups);
echo("
Average time by key pressed:");
echo($moyenne);
echo("seconds
The computer have predicted:");
echo($reussite);
echo("% of your thoughts.
");
if ($reussite>50) {
echo("
");
} else {
echo("
");
}
echo("
");
$ipnamou=getHostByAddr($_SERVER['REMOTE_ADDR']);
$date=date("YmdHis");
$serie=bindec($serie);
if ($nbcoups>200) {
$saveto=$table;
} else {
$saveto=$table2;
}
$TableRep=mysql_query("SELECT * FROM $saveto WHERE ipnamou='$ipnamou' and nbcoups='$nbcoups' and reussite='$reussite'");
$NombreEntrees=mysql_NumRows( $TableRep);
if ($NombreEntrees<1) {
$instruction="INSERT INTO $saveto VALUES ('$ipnamou','$date','$duree','$nbcoups','$reussite','$moyenne','$serie','$HTTP_REFERER')";
mysql_query( $instruction);
}
} else {
?>
You have not tryed to play ! Go back to http://intelligence.sergi5.com
and try to type on your key board on keys "1" or "0" randomly !
}
if ($nbcoups>200) {
if ($reussite>50) {
echo("
The computer won (again) !
");
} else {
echo("
You have won! Congratulation
");
}
?>
What others have played:
Stats generated in Dec 2003:
Time by Key pressed | Nb of games | % of games won | Average Score |
0 sec-.25 sec | 343 | 98% |  |
77% |  |
0.25 sec - 0.5 sec | 1260 | 96% |  |
71% |  |
0.5 sec - 0.75 sec | 1008 | 89% |  |
65% |  |
0.75 sec - 1 sec | 594 | 82% |  |
61% |  |
1 sec - 2 sec sec | 835 | 63% |  |
55% |  |
2 sec - 10 sec sec | 391 | 55% |  |
42% |  |
The computer have won
83 % of the
4431 games played !
Average number of key pressed by game:353.
That means a total of predictions of 1566553 during 283 days,4 hours,9 minutes,8 seconds
Pretty cool, yeah ? That is incredible !
Ask your friends to try if they are less determined than you are !
You have finished with that game, visit now one of our sponsors to help us:
Thank you
} else {
?>
You have not typed enough key! You have to type at least 205 times. Your score has not been saved!
Go Back to http://intelligence.sergi5.comand type at least 205 times. So that you will see amazing stats about what others have played and be able to continue.
}
} else {
?>
$won=0;
//$won=settype($won,"double");
$TableRep=mysql_query("SELECT * FROM $table");
$NombreEntrees=mysql_NumRows( $TableRep);
$i=0; /* initialisation de la variable de boucle */
while ($i < $NombreEntrees) { /* faire tant que la fin de la table n'est pas atteinte */
$reussite = mysql_result($TableRep, $i, "reussite");
if ($reussite>50) { $won=$won+1; }
$i++; /* On passe y´ líenregistrement suivant */
} /*Quand tout est affichÈ, on sort de la boucle */
?>

Try to find where the ball is hidden
Press on the keybord 0 or 1 to choose your side to play.
To save your score and continue, you have to play at least 205 times.
The computer will try to guess what you will choose and hide the ball on the other side.
} ?>
} ?>
made by sergi@sergi5.com (please send your comments!)
sergi (c) XXIth century
(Send your javascript algorithms to try them online. They will be added here)
's HomePage |
|