| Это пример моего скрипта
<?php
//Фон для изображения
$img=ImageCreateFromPng("theme/fon.png");
$str="http//:{$_SERVER['HTTP_HOST']}";
//Цвет рамки
$linecolor=ImageColorAllocate($img, 68, 73, 72);
$white=ImageColorAllocate($img, 255, 253, 255);
$fontshadow=ImageColorAllocate($img, 0, 0, 0);
$fontcolor=ImageColorAllocate($img, 221, 227, 232);
//Верхняя, нижняя, левая и павые внешние рамки
ImageLine($img, 0, 0, 299, 0, $linecolor);
ImageLine($img, 0, 59, 299, 59, $linecolor);
ImageLine($img, 0, 0, 0, 59, $linecolor);
ImageLine($img, 299, 0, 299, 59, $linecolor);
//Верхняя, нижняя, левая и павые внутренние рамки
ImageLine($img, 2, 2, 297, 2, $linecolor);
ImageLine($img, 2, 57, 297, 57, $linecolor);
ImageLine($img, 2, 2, 2, 57, $linecolor);
ImageLine($img, 297, 2, 297, 57, $linecolor);
//Точки
for ($x=4,$y1=4,$y2=6,$y3=8; $x<=296; $x+=2){
ImageSetPixel($img, $x, $y1, $white);
ImageSetPixel($img, $x, $y2, $white);
ImageSetPixel($img, $x, $y3, $white);
}
//Текст на изображении
ImageString($img, 5, 33, 25, $str, $fontshadow);
ImageString($img, 5, 33, 26, $str, $fontcolor);
//Вывод картинки
Header("Content-Type: image/png");
ImagePng($img);
ImageDestroy($img);
?> | |