.01
.02
.03
.04
.05
.06
.07
.08
.09
.10
.11
.12
.13
.14
.15
.16
.17
.18
.19
.20
.21
.22
.23
.24
.25
.26
.27
.28
.29
.30
.31
.32
|
|
<?php
/******************************************************************************/
/* */
/* __ ____ */
/* ___ / / ___ / __/__ __ _____________ ___ */
/* / _ \/ _ \/ _ \_\ \/ _ \/ // / __/ __/ -_|_-< */
/* / .__/_//_/ .__/___/\___/\_,_/_/ \__/\__/___/ */
/* /_/ /_/ */
/* */
/* */
/******************************************************************************/
/* */
/* Titre : Afficher une citation au hasard */
/* */
/* URL : http://www.phpsources.org/scripts288-PHP.htm */
/* Auteur : Ekannott */
/* Date édition : 10 Juil 2007 */
/* Website auteur : http://ffhistory.ze.cx */
/* */
/******************************************************************************/
$fichier = file('quotes.txt'); // Nom du fichier qui contient les citations
$total = count($fichier); // Total du nombre de lignes du fichier
$i = mt_rand(0, $total); // Nombre au hasard entre 0 et le total du nombre de lignes
echo $fichier[$i]; // On affiche une citation au hasard
?>
|