fyfywkaBanner

fyfywka

TeamSpeak Developer
Contributor
Sep 10, 2015
147
140
158
Requirements
PHP 7.0.0 (PHP 5+ is not tested)
ImageMagick
Web Server:D

Code:
$cfg['ts3'] = [
    'ip'        => '127.0.0.1',
    'qport'     => '10011',
    'vport'     => '9987',
    'login'     => 'serveradmin',
    'pass'      => 'passw',
    'botname'   => sprintf('fyfywka [Banner][%d]', rand(0,99)),
    'blocking'  => '0'
];
Code:
$cfg['banner'] = [
    'default_language' => 'RU',                     // fyfywkaBanner/lang
    'time_zone'        => 'Europe/Kiev',            //
    'img'              => 'img1.png',               // fyfywkaBanner/img
    'filter'           => 'img0.png',               // fyfywkaBanner/img
    'font'             => 'Raleway-Medium.ttf',     // fyfywkaBanner/font
];
Code:
$text = [
    ['x' => 100, 'y' => 100, 'angle' => 0, 'color' => '#fff', 'size' => 50, 'text' => sprintf($lang->nickname, $Client['client_nickname'])],
    ['x' => 100, 'y' => 200, 'angle' => 0, 'color' => '#fff', 'size' => 50, 'text' => sprintf($lang->time, date('H:i'))],
    ['x' => 100, 'y' => 300, 'angle' => 0, 'color' => '#fff', 'size' => 50, 'text' => sprintf($lang->date, date('d.m.Y'))],
    ['x' => 100, 'y' => 400, 'angle' => 0, 'color' => '#fff', 'size' => 50, 'text' => sprintf($lang->online, $server['now'], $server['max'])],
];
 
Last edited:

Erza86

Member
Sep 21, 2015
60
18
40
I also get an error:
[Sat Feb 11 21:15:54.073065 2017] [:error] [pid 2404] [client *******:50499] PHP Notice: Trying to get property of non-object in /var/www/html/banner2/fyfywkaBanner/config/text.php on line 4
for line 5,6,7 too
Next thing is there gets no text generated if i call the banner.php
 

fyfywka

TeamSpeak Developer
Contributor
Sep 10, 2015
147
140
158
I also get an error:
[Sat Feb 11 21:15:54.073065 2017] [:error] [pid 2404] [client *******:50499] PHP Notice: Trying to get property of non-object in /var/www/html/banner2/fyfywkaBanner/config/text.php on line 4
for line 5,6,7 too
Next thing is there gets no text generated if i call the banner.php
download the dev version and try again
what do you have in place of the banner?
default_language -> *.json?
 

Erza86

Member
Sep 21, 2015
60
18
40
ah i think i found the issue.

just thought i can add a new .json file with my input, it seems he cant acknowledge it, for some reason
 

Erza86

Member
Sep 21, 2015
60
18
40
im stupid missed a "{" but you can have it i think thats really 1:1 translated into german

here is the correct "DE" file -> http://filehorst.de/d/bIccyEoi

works as intend now - will test it a little while now :)

thanks for all your fast replies
 
Last edited:

ULDIN

Well-Known Member
Mar 14, 2016
95
33
108
good JOBS.

TR.JSON File;
PHP:
{
    "translation": {
        "author"        : "MuratBeylByProf <SancaklarTim>",
        "uid"           : "xnGnriK1dsPbHmPm5RU73RPlIYk=",
        "email"         : "[email protected]",
        "date"          : "12.02.2017",
        "language"      : "Turkish"
    },
    "nickname"          : "ISIM : %s",
    "time"              : "SAAT : %s",
    "date"              : "TARIH : %s",
    "online"            : "AKTIF : %d/%d"
}
 

ULDIN

Well-Known Member
Mar 14, 2016
95
33
108
Php version for error fields;

bd4d7f1abc9a4b578c06a8fe36b8cd56.png

It should be.
 

Erza86

Member
Sep 21, 2015
60
18
40
would it be possible that you cache the things and that he only make one connection each minute and not like it is now like spamming the Serverchat.

thanks so far.
 

fyfywka

TeamSpeak Developer
Contributor
Sep 10, 2015
147
140
158
would it be possible that you cache the things and that he only make one connection each minute and not like it is now like spamming the Serverchat.

thanks so far.
I have a working generator with 2 parts, bot and generator
Bot always sits on the server and generates clientlist.json for the generator, generator accesses the clientlist.json to generate img
Code:
{"ts3":{"now_query":1,"now_user":1,"max_slot":512,"now_channel":84},"client":{"123.123.123.123":"QEyu+4hjyUeA5tLW+2aQJJ+wi0A="}}
 

Erza86

Member
Sep 21, 2015
60
18
40
sounds nice i think it would be cleaner and you get not so much spam in the Serverchat i also think it would give a lot more of performance if it comes to the point if you have hundreds of users on an teamspeak.
 

fyfywka

TeamSpeak Developer
Contributor
Sep 10, 2015
147
140
158
would it be possible that you cache the things and that he only make one connection each minute and not like it is now like spamming the Serverchat.

thanks so far.
Download [VT]
1 bot -> unzip it into a folder on server
2 generator -> unzip it into a folder on webserver
3 configure bot/banner
5 configure webserver
location ~ clientList.json {
deny all;
}
<Files ~ "clientList.json">
Order allow,deny
Deny from all
</Files>
4 run bot.php
nohup php bot.php &
 
Last edited:

Crysix

Member
Jan 7, 2017
71
19
46
Download [VT]
1 bot -> unzip it into a folder on server
2 generator -> unzip it into a folder on webserver
3 configure bot/banner
5 configure webserver
location ~ clientList.json {
deny all;
}
<FilesMatch "clientList.json">
Order allow,deny
Deny from all
</FilesMatch>
4 run bot.php
nohup php bot.php start &
The bot doesn't start.
Error: nohup: ignoring input and appending output to 'nohup.out'
I've got php 5. Maybe this is the reason (?)
 

fyfywka

TeamSpeak Developer
Contributor
Sep 10, 2015
147
140
158
The bot doesn't start.
Error: nohup: ignoring input and appending output to 'nohup.out'
I've got php 5. Maybe this is the reason (?)
try
nohup php bot.php </dev/null &>/dev/null &
you can run any comfortable for you method, screen...
 

Erza86

Member
Sep 21, 2015
60
18
40
For me it works:

i started the bot on a separate user with:

screen -S banner php bot.php

the .htaccess file on apache2 worked with (to make it not reachable from the outside):

<Files ~ "clientList.json">
Order allow,deny
Deny from all
</Files>

regards

Erza86
 
Top