Results 16 to 21 of 21
Thread: Dynamic Banner
-
28-06-2012, 21:14 #16
-= TeamSpeak Addict =-
- Join Date
- Jun 2011
- Location
- Russian Federation
- Posts
- 208
Unfortunately I did not understand this ...
-
28-06-2012, 22:32 #17
-= TeamSpeak Addict =-
- Join Date
- Jun 2011
- Location
- Russian Federation
- Posts
- 208
please help if you know how) I can see much to ask, just know that by this forum you have your personal life and time, well, if the possibility exists there, then they help to make this script as a gif
-
11-07-2012, 23:16 #18
-= TeamSpeak Addict =-
- Join Date
- Jun 2012
- Location
- Portugal
- Posts
- 145
I grabbed your code and modified a little. You can put files in any dir and picks .jpg and .png and the rest does the same as your code.
External URLs can be used instead of /images/ as long your host has allow_url_fopen allowed.
PHP Code:<?php
// URL or directory including the last slash ( / )
$img_dir = 'images/';
//dont edit below this point
$images = array();
// find all images in dir //
$files = scandir($img_dir);
foreach($files as $f) {
$extension = end(explode('.',$f));
if($extension == 'jpg') {
$images[] = $f;
}
elseif($extension == 'png') {
$images[] = $f;
}
}
$random = array_rand($images);
$chosen = $images[$random];
if(end(explode('.',$chosen)) == 'jpg') {
$image = imagecreatefromjpeg($img_dir.$chosen);
}
elseif(end(explode('.',$chosen)) == 'png') {
$image = imagecreatefrompng($img_dir.$chosen);
}
// WRITE OUT THE IMAGE //
header('Content-type: image/jpeg');
imagejpeg($image, NULL, 100);
imagedestroy($image);
?>Last edited by barricas; 12-07-2012 at 00:29.
-
12-07-2012, 05:53 #19
-= TeamSpeak Addict =-
- Join Date
- Jun 2011
- Location
- Russian Federation
- Posts
- 208
Thanks of course, but do not understand the meaning of your actions, if this is the same ... You could not have done the same way only with gif formats
-
12-07-2012, 08:31 #20
-= TeamSpeak Team =-
- Join Date
- Jun 2008
- Posts
- 7,762
---------------------------------------------------------
Please don't send me private support questions.
They belong into the forum and maybe other users have these questions/problems too.
TeamSpeak FAQ || What should i report, when i open a client thread? || Report and upload your Crashdump here
NPL License (Registration)
-
12-07-2012, 14:52 #21
-= TeamSpeak Addict =-
- Join Date
- Jun 2012
- Location
- Portugal
- Posts
- 145
As dante said, it is possible with a script to check the info then putting it in an image.
Btw if support for more images is needed just add more elseif's, or tell me I can add more.
I just improved the fact you don't need to list everyimage in the file, just put in a dir and it gets all for you. Just makes it simplier.
I tested it and it works wonders.... downloaded a bunch of game banners to a dir and it gets them all.
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Similar Threads
-
High CPU Usage for TS3 Client caused by TS3 SERVER's Banner Feature
By montagnesy in forum Server SupportReplies: 5Last Post: 15-02-2013, 01:51 -
Channel Banner
By yamato in forum WindowsReplies: 3Last Post: 01-07-2012, 13:43 -
Dynamic Banner
By webhostbudd in forum [TeamSpeak 2] Server SupportReplies: 1Last Post: 02-09-2008, 21:57 -
banner problem
By wisley in forum [TeamSpeak 2] Server SupportReplies: 9Last Post: 08-08-2006, 12:06 -
Banner in TS
By SoulTaker2002 in forum [TeamSpeak 2] Server SupportReplies: 45Last Post: 15-02-2006, 16:56


Reply With Quote
