Creating a banner with Time and Date which updates every 60 secs. HALP!

iAndrewGG

Member
Joined
Mar 9, 2016
Messages
34
Reaction score
4
Points
40
Hello guys,
I've tried writing myself a php script to do it but seems like it doesn't really want to work...
Just wondering if anyone else have done it before and could share it with me? I've searched already (on our forums + another places) and i couldn't really find it.

Regards, Andrew
 

Qraktzyl

Retired Staff
Contributor
Joined
Nov 2, 2015
Messages
997
Reaction score
723
Points
161
I've seen a couple of those on the forums here, you might retry to search for it lol!
I know @Multivit4min had one, I'm still using his version but I really wondered what happened with it. It looks like he removed the download from his website.
 
Joined
Dec 5, 2015
Messages
25
Reaction score
2
Points
35
I've seen a couple of those on the forums here, you might retry to search for it lol!
I know @Multivit4min had one, I'm still using his version but I really wondered what happened with it. It looks like he removed the download from his website.
He dont have VIP so... ;) dont have access to this scripts
 

Multivit4min

Member
Joined
Sep 2, 2015
Messages
27
Reaction score
49
Points
53
The links are up again on my site multivitamin.wtf, but currently my page has no real content,
I maybe get some CMS later when I have some money + time left so I dont need to create the Page by myself ;)
 

dedmen

TeamSpeak Developer
Contributor
Joined
Mar 28, 2016
Messages
530
Reaction score
584
Points
197
There you go. This needs "php5-imagick" installed. just put call this from a php script and then just use the link to the site as the image in teamspeak. I use that on mine to display something like a news report.
This is a raw copy out of my code so dont complain about uglyness ^^
PHP:
function makeImageF($text, $W=800, $fsize=13,$bgr=1,$bgb=1,$bgg=1,$bga=127){
      $H = substr_count ($text,"\n") * 20;
       //$H = 50;
       
    $im = imagecreatetruecolor($W, $H);
       imagesavealpha($im, true);
    $background_color = imagecolorallocatealpha ($im, $bgr,$bgb,$bgg,$bga);        //RGB color background.
    imagefill ($im,0,0,$background_color);
       $text_color = imagecolorallocate($im, 0, 0, 0);
       
       $i = 0;
       putenv('GDFONTPATH=' . realpath('.'));
       foreach (explode("\n" , $text) as $value){
           imagettftext ($im , $fsize ,0, 0 , ($i * 16)+16, $text_color, dirname(__FILE__) . '/cour.ttf',$value);
           //array imagettftext ( resource $im , int $size , int $angle , int $x , int $y , int $col , string $fontfile , string $text )
           // imagestring($im, 1, 0, $i * 20, $value,$text_color);
           $i+=1;
       }
    header('Content-type: image/png');//jpeg
    imagepng($im);
    imagedestroy($im);
    return;
}
 
Top