ical-icoontje-genereren
Gesponsorde koppelingen
PHP script bestanden
Code (php)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
<?php
header("content-type: image/jpg");
if(isset($_GET[timestamp]))
{
$maand = strtoupper(date("M",$_GET[timestamp]));
$dag = date("j",$_GET[timestamp]);
}
else
{
$maand = strtoupper(date("M"));
$dag = date("j");
}
$fontmaand = 'HelveticaBold.ttf';
$fontdag = 'LucidaBold.ttf';
$image = ImageCreateFromJpeg("iCalicon.jpg");
$wit = ImageColorAllocate($image,255,255, 255);
$zwart = ImageColorAllocate($image,75,75, 75);
imagettftext($image, 9, 11, 12, 31, $wit, $fontmaand, $maand);
if(strlen($dag) == 2)
{
imagettftext($image, 25, 11, 20, 60, $zwart, $fontdag, $dag);
}
else
{
imagettftext($image, 25, 11, 30, 60, $zwart, $fontdag, $dag);
}
ImageJpeg($image);
ImageDestroy($image);
?>
header("content-type: image/jpg");
if(isset($_GET[timestamp]))
{
$maand = strtoupper(date("M",$_GET[timestamp]));
$dag = date("j",$_GET[timestamp]);
}
else
{
$maand = strtoupper(date("M"));
$dag = date("j");
}
$fontmaand = 'HelveticaBold.ttf';
$fontdag = 'LucidaBold.ttf';
$image = ImageCreateFromJpeg("iCalicon.jpg");
$wit = ImageColorAllocate($image,255,255, 255);
$zwart = ImageColorAllocate($image,75,75, 75);
imagettftext($image, 9, 11, 12, 31, $wit, $fontmaand, $maand);
if(strlen($dag) == 2)
{
imagettftext($image, 25, 11, 20, 60, $zwart, $fontdag, $dag);
}
else
{
imagettftext($image, 25, 11, 30, 60, $zwart, $fontdag, $dag);
}
ImageJpeg($image);
ImageDestroy($image);
?>