Pages vues depuis 25/05/2001 : 106 576 224
Index du forum »» Pour débuter »» affichage aléatoire d'images (PHP)
!PHP!<!--meta
<?php
global $cookie;
$username = $cookie[1];
if ($username == "") {
echo translate("Create</a> an account")."\n";
} else {
echo translate("Welcome")." : <a href=user.php class=header>$username</a>";
}
?>
meta-->
<?
$cpt=10;
srand((double)microtime()*1000000);
$nbr=rand(0,($cpt-1));
print ("<img
src='/photos_accueil/photo$nbr.jpg' alt=''></a>");v
?>
!PHP!meta
");v
?>
meta-->
!PHP!<!--meta<?php
$cpt=20;
srand((double)microtime()*1000000);
$nbr=rand(0,($cpt-1));
print ("<img
src='/photos_2008/photo$nbr.jpg' alt=''></a>");v
?>meta-->
<?
$cpt=10;
srand((double)microtime()*1000000);
$nbr=rand(0,($cpt-1));
print ("<img
src='/photos_accueil/photo$nbr.jpg' alt=''></a>");v
?>