php ball image

raw

phork0.php

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
<?php
$w = $h = 600;
$i = imagecreatetruecolor($w, $h);
 
$color = 0;
for ($x = $w; $x > 0; --$x) {
    $color = 255 / $w * ($w - $x);
    $col = imagecolorallocate($i, 0, $color, 0);
    imagefilledellipse($i, $w / 2, $h / 2, $x, $x, $col);
}
 
header('Content-type: image/png');
imagepng($i);
?>
 
Christian Weiske Christian Weiske
owner

History