C'est toujours beau un SS, mais celui là, il est à tomber par terre.
De toute façon, toute les Ducati devraient être dans cet état.
Bruno 1

Code : Tout sélectionner
<?php
header('Content-type: image/jpeg');
$max = (empty($_GET['size']))? 500:$_GET['size'];
$img_url = $_GET['url'];
$img = imagecreatefromjpeg($img_url);
$x = imagesx($img);
$y = imagesy($img);
if($x>$max or $y>$max)
{
if($x>$y)
{
$nx = $max;
$ny = $y/($x/$max);
}
else
{
$nx = $x/($y/$max);
$ny = $max;
}
}
$nimg = imagecreatetruecolor($nx,$ny);
imagecopyresampled($nimg,$img,0,0,0,0,$nx,$ny,$x,$y);
imagejpeg($nimg);
?>
Code : Tout sélectionner
[url=http://lien vers ton imageGrandeTaille.jpg][img]http://tonsiteweb/tonscript.php?size=200&url=cheminrelatif/tonimage.jpg[/img][/url]