あなたは私を助けることができるかもしれません。_GET または _POST 文字列からポリライン パスを描画し、生成された画像をフォルダーに保存する関数が必要です。たとえば、私のリンクは次のようになります: http://img.domain.com/?points = 1,5,-70,300,250,500... 画像が既に生成されていて変更されていない場合 -> フォルダーから読み込みます。それ以外の場合は、新しいものを生成します。
ここに私のコード:
if (isset($_POST['points'])) {
$points = $_POST['points'];
$image = imagecreate(200, 200);
$white = imagecolorallocate($image, 255, 255, 255);
$black = imagecolorallocate($image, 0, 0, 0);
... polyline path drawing here...?
imageline($image, 10, 10, 10, 190, $black);
header('Content-Type: image/png');
imagepng($image);
imagedestroy($image);
... how to save it to the server?
}
ありがとう。