pour
http://fredos.fr/efed/efed.phpil y a un code pour reproduire l'img aider moi a comprendre SVP
<?php header('Content-type: text/html; charset=UTF-8'); ?>
<html>
<head>
<title>RESULTAT EFED</title>
<style>
body{background:black;color:lightgrey;font-size:16px;}
.boite{background:lightgrey;color:black;width:80%;margin:0 auto;padding:5px;}
table{color:black;}
td{text-align:center}
input{font-size:15px;margin:8px;}
h1{font-size:18px;color:yellow;margin:10px;text-align:center}
</style>
</head>
<body>
<h1>EFED 2.0 Fan de Catch</h1>
<div class="boite">
<form action="<? echo $PHP_SELF; ?>" name="match" method="post">
<table border=0 width=100% cellpadding=0 cellspacing=0>
<tr>
<td>catcheur 1<input type="text" name="catcheur1" /></td>
<td>catcheur 2<input type="text" name="catcheur2" /></td>
<td>catcheur 3<input type="text" name="catcheur3" /></td>
</tr>
<tr>
<td>catcheur 4<input type="text" name="catcheur4" /></td>
<td>catcheur 5<input type="text" name="catcheur5" /></td>
<td>catcheur 6<input type="text" name="catcheur6" /></td>
</tr>
<tr>
<td>catcheur 7<input type="text" name="catcheur7" /></td>
<td>catcheur 8<input type="text" name="catcheur8" /></td>
<td>catcheur 9<input type="text" name="catcheur9" /></td>
</tr>
<tr>
<td>stipulation <input type="text" name="stipulation" value="" /></td>
<td>prise victorieuse ? <input type="checkbox" name="prise" value="0" /></td>
<td>titre du match <input type="text" name="champ" value="" /></td>
</tr>
<tr>
<td colspan=3 align="center"><input type="submit" name="valider" value="commencer le match" /></td>
</tr>
</table>
</form>
</div>
<p align="center"><a href="http://fredos.fr/efed/historique.php">historique</a></p>
<?php
if($_POST['valider']){
// print_r($_POST);
?><br /><br />
<div class="boite">
<?php
$catcheur1 = '';
$catcheur1 = $_POST['catcheur1'];
$catcheur2 = '';
$catcheur2 = $_POST['catcheur2'];
$catcheur3 = '';
$catcheur3 = $_POST['catcheur3'];
$catcheur4 = '';
$catcheur4 = $_POST['catcheur4'];
$catcheur5 = '';
$catcheur5 = $_POST['catcheur5'];
$catcheur6 = '';
$catcheur6 = $_POST['catcheur6'];
$catcheur7 = '';
$catcheur7 = $_POST['catcheur7'];
$catcheur8 = '';
$catcheur8 = $_POST['catcheur8'];
$catcheur9 = '';
$catcheur9 = $_POST['catcheur9'];
$stipulation = '';
$stipulation = $_POST['stipulation'];
$tableauCatcheurs = array();
if($catcheur1=='' || $catcheur2==''){?>
il faut entrer des noms de catcheur ( au moins deux )
<?php }
if($catcheur1!='' && $catcheur2!=='')
{
$tableauCatcheurs = array($catcheur1,$catcheur2);
}
if($catcheur1!='' && $catcheur2!=='' && $catcheur3!=='')
{
$tableauCatcheurs = array($catcheur1,$catcheur2,$catcheur3);}
if($catcheur1!='' && $catcheur2!=='' && $catcheur3!=='' && $catcheur4!=='')
{
$tableauCatcheurs = array($catcheur1,$catcheur2,$catcheur3,$catcheur4);}
if($catcheur1!='' && $catcheur2!=='' && $catcheur3!=='' && $catcheur4!=='' && $catcheur5!=='')
{
$tableauCatcheurs = array($catcheur1,$catcheur2,$catcheur3,$catcheur4,$catcheur5);}
if($catcheur1!='' && $catcheur2!=='' && $catcheur3!=='' && $catcheur4!=='' && $catcheur5!=='' && $catcheur6!=='')
{
$tableauCatcheurs = array($catcheur1,$catcheur2,$catcheur3,$catcheur4,$catcheur5,$catcheur6);}
if($catcheur1!='' && $catcheur2!=='' && $catcheur3!=='' && $catcheur4!=='' && $catcheur5!=='' && $catcheur6!=='' && $catcheur7!=='')
{
$tableauCatcheurs = array($catcheur1,$catcheur2,$catcheur3,$catcheur4,$catcheur5,$catcheur6,$catcheur7);}
if($catcheur1!='' && $catcheur2!=='' && $catcheur3!=='' && $catcheur4!=='' && $catcheur5!=='' && $catcheur6!=='' && $catcheur7!=='' && $catcheur8!=='')
{
$tableauCatcheurs = array($catcheur1,$catcheur2,$catcheur3,$catcheur4,$catcheur5,$catcheur6,$catcheur7,$catcheur8);}
if($catcheur1!='' && $catcheur2!=='' && $catcheur3!=='' && $catcheur4!=='' && $catcheur5!=='' && $catcheur6!=='' && $catcheur7!=='' && $catcheur8!=='' && $catcheur9!=='')
{
$tableauCatcheurs = array($catcheur1,$catcheur2,$catcheur3,$catcheur4,$catcheur5,$catcheur6,$catcheur7,$catcheur8,$catcheur9);
}
shuffle($tableauCatcheurs);
// print_r($tableauCatcheurs);
// echo "vainqueur : ".$tableauCatcheurs[0];
// echo '<br />perdants : <br />';
$totalCatcheur = count($tableauCatcheurs);
for($i=1;$i < $totalCatcheur ;$i++)
{
$perdant.= $tableauCatcheurs[$i];
if ($totalCatcheur > 2 && $i < $totalCatcheur-1)
{
$perdant.= ' , ';
}
}
$date = date("d-m-y-h-i-s");
if($_POST['prise']=='0'){ $prise=1; }else {$prise=0;}
if($_POST['champ']!=''){ $champ=$_POST['champ']; }else {$champ="";}
if(!($catcheur1=='' || $catcheur2=='')){
// echo "prise".$prise;
?>
<img src="image.php?g=<?php echo addslashes($tableauCatcheurs[0]); ?>&p=<?php echo addslashes($perdant); ?>&d=<?php echo $date; ?>&s=<?php echo addslashes($stipulation); ?>&prise=<?php echo $prise; ?>&t=<?php echo $totalCatcheur; ?>&champ=<?php echo $champ; ?>" width=0 height=0 />
<p align="center" style="font-size:15px;">adresse de l'image :
http://fredos.fr/efed/image/<?php echo $date; ?>.jpg</p>
<p align="center"><a href="javascript:void(0);" onclick="var src = 'http://fredos.fr/efed/image/<?php echo $date; ?>.jpg';document.getElementById('graph').src = src;document.getElementById('graph').width = 685;document.getElementById('graph').height = 200;">voir le resultat</a></p>
<p align="center" id="imageShow"><img id="graph" src="" width="0" height="0" border="0"/></p>
<?php } ?>
</div>
<?php } ?>
</body>
fichier image.php
<?php
header('Content-type: text/html; charset=UTF-8');
$nom_image = "fond.jpg"; // le nom de votre image avec l'extension jpeg
$gagnant = utf8_decode(stripslashes(stripslashes(stripslashes("gagnant : ".$_GET['g']))));
$perdant = utf8_decode(stripslashes(stripslashes(stripslashes($_GET['p']))));
$date = $_GET['d'];
$stipulation ='';
if($_GET['s']!=''){
$stipulation = 'stipulation : '.utf8_decode(stripslashes(stripslashes(stripslashes($_GET['s']))));
}
$prise = array("Armbreaker","Back Body Drop","Mountain Bomb","Backbreaker","Body slam","Brainbuster","Bulldog","Chokeslam","Cobra Clutch Leg Sweep","Cutter","DDT","Death Valley Driver","Double Nelson","Dragon Screw","Drop Toe-Hold","Electric Chair Bomb","Facebreaker","Facebuster","Flapjack",
"Giant Swing","Gutbuster","Headscissors takedown","Jawbreaker","Mat slam","Monkey flip","Muscle Buster","Neckbreaker","Piledriver","Powerbomb","Powerslam","Roll-Up","Samoan drop","Shin breaker","Shoulderbreaker","Snake Eyes","Snapmare","High Angle Senton Bomb","STO","Suplex");
shuffle($prise);
if($_GET['prise']=='1'){
$gagnant = $gagnant . " ( avec : ".$prise[0]." ) ";
}
$perdantNew1= "";
$perdantNew2= "";
if($_GET['t']>4){
$perdant = explode(' , ',$perdant);
$nombrePerdant = count($perdant);
for($i=0;$i<3;$i++)
{
$perdantNew1 .= $perdant[$i].' , ';
}
for($i=3;$i<$nombrePerdant;$i++)
{
$perdantNew2 .= $perdant[$i].' , ';
}
$perdantNew1 = "perdants : ".$perdantNew1;
}
if($_GET['t']==2){
$perdant = "perdant : ".$perdant;
}
if($_GET['t']==3 || $_GET['t']==4){
$perdant = "perdants : ".$perdant;
}
$championnat ="";
if($_GET['champ']!=''){
$championnat = $_GET['champ'];
}
header ("Content-type: image/jpeg");
$image = imagecreatefromjpeg($nom_image);
$rouge = imagecolorallocate($image, 255, 0, 0);
$blanc = imagecolorallocate($image, 255, 255, 255);
$jaune = imageColorAllocate($image, 255,255,0);
imagestring($image, 4, 30, 25,$championnat, $rouge);
imagestring($image, 42, 30, 55,$gagnant, $jaune);
if($_GET['t']>4){
imagestring($image, 3, 20, 85,$perdantNew1, $blanc);
imagestring($image, 3, 100, 115,$perdantNew2, $blanc);
}
else{imagestring($image, 12, 20, 85,$perdant, $blanc);}
if($stipulation!=''){imagestring($image, 4, 30, 175,$stipulation, $jaune);}
$fichier = 'image/'.$date.'.jpg';
imagejpeg($image,$fichier);
imagedestroy($image);
?>
normalement ca donne ca :
ils disent qu'il faut creer un fichier d'image