<?php
header("Content-type: image/gif");
$width = 520;
$size = 13;
$img = imagecreate($width, $width);
$bg_color = imagecolorallocate($img, 0, 0, 0);
$red = imagecolorallocate($img, 255, 0, 0);
for ($i = 0; $i <= $width; $i++) {
$x = (16 * pow(sin($i), 3)) * $size + $width / 2;
$y = (13 * cos($i) - 5 * cos(2 * $i) - 2 * cos(3 * $i) - cos(4 * $i)) * $size + $width / 2;
imagesetpixel($img, $x, $y, $red);
}
$img = imagerotate($img, 180, 0);
imagegif($img);
imagedestroy($img);
- 上一篇: PHP REDIS扩展更简便的办法
- 下一篇: Supervisor 安装与使用